[libvirt] [PATCH 1/3] Only check for IP forwarding, do not enable it

Cole Robinson crobinso at redhat.com
Mon Oct 15 16:04:03 UTC 2012


On 10/15/2012 10:54 AM, Michal Privoznik wrote:
> On 15.10.2012 12:26, Benjamin Cama wrote:

>>  
>>  static int
>>  networkSetIPv6Sysctls(virNetworkObjPtr network)
>> @@ -2140,11 +2172,9 @@ networkStartNetworkVirtual(struct network_driver *driver,
>>      if (virNetDevSetOnline(network->def->bridge, 1) < 0)
>>          goto err2;
>>  
>> -    /* If forwardType != NONE, turn on global IP forwarding */
>> +    /* If forwardType != NONE, check for IP forwarding */
>>      if (network->def->forwardType != VIR_NETWORK_FORWARD_NONE &&
>> -        networkEnableIpForwarding(v4present, v6present) < 0) {
>> -        virReportSystemError(errno, "%s",
>> -                             _("failed to enable IP forwarding"));
>> +        networkCheckIpForwarding(v4present, v6present) < 0) {
>>          goto err3;
>>      }
>>  
>>
> 
> Well, I am not sure if we can do this. What would happen if some of our
> users rely on this already? I mean, it's there since ages.
> 
> Michal

Indeed this kinda defeats the purpose of the default virtual network that
should 'just work' out of the box. Maybe we could add some libvirtd.conf
option to enable this check-if-set behavior, but we can't change the default here.

- Cole




More information about the libvir-list mailing list