Re: [PATCH-v4 1/2] create virSocketAddrGetIpPrefix utility function

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

 



On 04/22/2013 10:20 AM, Laine Stump wrote:
> On 04/20/2013 03:45 PM, Gene Czarcinski wrote:
>> Create the utility function virSocketAddrGetIpPrefix() to
>> determine the prefix for this network.  The code in this
>> function was adapted from virNetworkIpDefPrefix().
>>
>> Update virNetworkIpDefPrefix() in src/conf/network_conf.c
>> to use the new utility function.
>> .
>> Signed-off-by: Gene Czarcinski <gene@xxxxxxxxx>
>> ---
> ACK. I'll push it after I've reviewed 2/2.


After going through patch 2/2, I realized that maintaining the "return
-1 when no prefix or netmask or address is specified" rule in this new
function will prevent someone from declaring a default route on a network:

     <route gateway='1.2.3.4'/>

because this will return -1. I checked all the callers of the original
function, and they all are already guaranteed to have a valid address,
so we can safely change the default case of this function to return 0.

I'm going to make that change and push this patch so that you don't have
to resubmit it with the new spin of 2/2 that I'm requesting.

--
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]