GNOME Bugzilla – Bug 706618
ip6: don't call addrconf6_start() for method=link-local
Last modified: 2013-11-07 23:52:30 UTC
The IPv6 link-local method is a rather unfortunate name for disabled IPv6 configuration (where only kernel-managed link-local addresses are used, see bug 682932). But nm-device.c seems to treat link-local differently and runs addrconf6_start(): 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; } else ret = NM_ACT_STAGE_RETURN_POSTPONE; } else if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) == 0) { Didn't check it thoroughly, thoug.
I pushed commit http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=10bd060076befc4b711125a19831d323f9ea8595 This now treads link-local different from auto. If the device has currently no LL address configured, it stops IPv6 on the device. In a later iteration, we want to wait for an IPv6 address to appear. There is already bug #707155 for that issue, so I will close this bug as resolved.
This will make IPv6 link-local connections randomly fail, because there is a race condition between the kernel adding the IPv6LL address, and NM checking for it. Maybe that's why it was using rdisc before... it was using it just to get the "wait for configuration to finish or a timeout occurs" behavior
Hmm, undocumented hacks, nice. While the final goal is to actually wait for the kernel to supply a link-local address, for now we might have to wait for some short period of time to get over the race.
(In reply to comment #2) > This will make IPv6 link-local connections randomly fail, because there is a > race condition between the kernel adding the IPv6LL address, and NM checking > for it. > > Maybe that's why it was using rdisc before... it was using it just to get the > "wait for configuration to finish or a timeout occurs" behavior Notice, that this should be solved now with https://bugzilla.gnome.org/show_bug.cgi?id=707155#c8