* Dan Williams > On Sun, 2011-08-07 at 18:39 +0200, Tore Anderson wrote: > >> It also changes the semantics of an ifcfg file that has only IPv6 layer >> 3 configuration settings (no IPv4) slightly, in this case DHCPv4 will be >> performed. Before, this configuration would lead to IPv4 being disabled. >> In order for IPv4 to be disabled when IPv6 is explicitly enabled, the >> BOOTPROTO variable must be set to NONE. > > Is the change in behavior of IPv4 consistent with what ifup does? Or > can you explain a bit more the reason for this change? The rest of the > patch is great, and now is the time to flip IPv6 on by default for > real :)
The last two chunks of the patch flips the implicit default values of the IPV6INIT and IPV4_FAILURE_FATAL variables to TRUE and FALSE, respectively, so that the default behaviour of the ifcfg-rh plugin matches that of the built-ins in NM when there's no config at all (cf. the other patch I sent right before this one). So far so good. However, this breaks an assumtion made elsewhere in the code: /* If there is no BOOTPROTO, no IPADDR, no PREFIX, no NETMASK, but * valid IPv6 configuration, assume that IPv4 is disabled. Otherwise, * if there is no IPv6 configuration, assume DHCP is to be used. * Happens with minimal ifcfg files like the following that anaconda * sometimes used to write out: * * DEVICE=eth0 * HWADDR=11:22:33:44:55:66 * */ The problem is that once we change the default value of IPV6INIT to TRUE, we also ensure that a minimal ifcfg file like the above will have «valid IPv6 configuration». Hence, without the change in the first chunk, the rest of the patch would lead to such a minimal ifcfg file actually *disabling* IPv4 - which is clearly undesirable. The change means that the semantics of a slightly less minimal ifcfg changes. Consider the following ifcfg file, where the admin explicitly enables IPv6: DEVICE=eth0 HWADDR=11:22:33:44:55:66 IPV6INIT=true Before, this would make ifup enable IPv6 and disable IPv4. With my patch, it will change behaviour so that both IPv4 and IPv6 is enabled. I feel this behaviour is the most intuitive one - why would anyone expect that enabling/disabling IPv6 changes the enabled/disabled state of IPv4? However, if the change is undesirable, it is probably possible to distinguish between the case where IPV6INIT is explicitly set to TRUE in the ifcfg file by the admin (in this case, proceed to disable IPv4 like before), versus the case it is not present in the file but still TRUE by the new implicit default (in this case, keep IPv4 enabled). That should keep the behaviour exactly backwards compatible - with the exception of enabling IPv6 by default, of course. ;-) Best regards, -- Tore Anderson _______________________________________________ networkmanager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
