core: allow IPv4 to proceed if IPv6 is globally disabled but set to "auto" (rh #1012151)

If the user disabled IPv6 support in the kernel with "ipv6.disable=1" on the
kernel boot line, then any attempts to open IPv6 sockets (which libndp does)
will fail.  This failed the entire connection, even if IPv6's "may-fail"
property was TRUE.  Instead, just fail IPv6 and allow IPv4 to proceed.  If
IPv4 fails or is disabled, then other logic will fail the entire connection.
This commit is contained in:
Dan Williams 2013-10-07 11:40:16 -05:00
parent 2af8c08f65
commit 9543e45afe

View file

@ -3329,8 +3329,8 @@ act_stage3_ip6_config_start (NMDevice *self,
if ( strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0
|| strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0) {
if (!addrconf6_start (self)) {
*reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
ret = NM_ACT_STAGE_RETURN_FAILURE;
/* IPv6 might be disabled; allow IPv4 to proceed */
ret = NM_ACT_STAGE_RETURN_STOP;
} else
ret = NM_ACT_STAGE_RETURN_POSTPONE;
} else if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) == 0) {