summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-08-13 14:29:25 -0500
committerDan Williams <dcbw@redhat.com>2014-08-29 16:03:37 -0500
commitc69531041aa362dd0a94a94907d3402be7884648 (patch)
tree38a1019617890e13a521dd08214c1f60aaa699d3
parent17e323fd22ec8b47893a5f44bcdf30dca93b11f8 (diff)
downloadNetworkManager-c69531041aa362dd0a94a94907d3402be7884648.tar.gz
core: apply manual IPv6 configuration earlier when RA is also used (rh #1101809)
Reporter left SLAAC enabled (because it's default and requires being explicitly turned off) and added manual IPv6 address. They expected that address to be assigned very soon after starting the connection, but it was not assigned. This happened because NM waits for RA before assigning any IPv6 configuration, including the manually specified addresses. In the reporters case, there was no IPv6 router on the network, so NM waited indefinitely for a router advertisement and never applied any IPv6 configuration. It seems reasonable to apply any IPv6 configuration we have available, when we have it. We already apply RA configuration before starting DHCP, and apply DHCP configuration if/when we get that.
-rw-r--r--src/devices/nm-device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 738b490815..e1bbad37a3 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -3627,6 +3627,10 @@ addrconf6_start_with_link_ready (NMDevice *self)
}
nm_rdisc_set_iid (priv->rdisc, iid);
+ /* Apply any manual configuration before starting RA */
+ if (!ip6_config_merge_and_apply (self, TRUE, NULL))
+ _LOGW (LOGD_IP6, "failed to apply manual IPv6 configuration");
+
nm_device_ipv6_sysctl_set (self, "accept_ra", "1");
nm_device_ipv6_sysctl_set (self, "accept_ra_defrtr", "0");
nm_device_ipv6_sysctl_set (self, "accept_ra_pinfo", "0");