After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706618 - ip6: don't call addrconf6_start() for method=link-local
ip6: don't call addrconf6_start() for method=link-local
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
git master
Other Linux
: Normal normal
: ---
Assigned To: Thomas Haller
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-08-22 21:33 UTC by Pavel Simerda
Modified: 2013-11-07 23:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2013-08-22 21:33:04 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.
Comment 1 Thomas Haller 2013-11-07 20:25:00 UTC
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.
Comment 2 Dan Winship 2013-11-07 20:43:17 UTC
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
Comment 3 Pavel Simerda 2013-11-07 20:50:12 UTC
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.
Comment 4 Thomas Haller 2013-11-07 23:52:30 UTC
(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