Re: [PATCH V2] Fix parsing of bond interface XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Blake wrote:
> On 03/21/2013 05:13 PM, Jim Fehlig wrote:
>   
>> Noticed that parsing bond interface XML containing the miimon element
>> fails
>>
>>   <interface type="bond" name="bond0">
>>     ...
>>     <bond mode="active-backup">
>>       <miimon freq="100" carrier="netif"/>
>>       ...
>>     </bond>
>>   </interface>
>>
>> This configuration does not contain the optional updelay and downdelay
>> attributes, but parsing will fail due to returning the result of
>> virXPathULong (a -1 when the attribute doesn't exist) from
>> virInterfaceDefParseBond after examining the updelay attribute.
>>
>> While fixing this bug, cleanup the function to use virXPathInt instead
>> of virXPathULong, and store the result directly instead of using a tmp
>> variable.  Using virXPathInt actually fixes a potential silent
>> truncation bug noted by Eric Blake.
>>
>> Also, there is no cleaup in the error label.  Remove the label,
>>     
>
> s/cleaup/cleanup/
>   

Will fix.

>   
>> returning failure where failure occurs and success if the end of the
>> function is reached.
>> ---
>>
>>     
>
> ACK
>   

But I'm going to wait to push this until I test it!  After fiddling with
the network too much on my test machine, I can no longer reach it.  I'll
have access to that machine tomorrow and will push this after testing.

Thanks,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]