#756534 network-manager: IPv6 hop limit set to 0

Package:
network-manager
Source:
network-manager
Description:
network management framework (daemon and userspace tools)
Submitter:
Ralf Jung
Date:
2014-10-29 22:36:10 UTC
Severity:
normal
#756534#5
Date:
2014-07-30 17:58:40 UTC
From:
To:
Dear Maintainer,

I am having trouble connecting to an IPv6 network. Other hosts in this network
(e.g. with Windows) connect fine. Unfortunately, I don't have access to any
other IPv6 network to test.

Running "ping6 ralfj.de" shows "Hop Limit exceeded", and indeed checking the
packets with Wireshark shows that the hop limit of all packets is 0.
When I try to connect to an IPv6 site with Firefox, the packets also have
hop limit 0.

IPv6 used to work fine around 1.5 months ago, I did not have the time to
try in between. There were several NM updates since then.

I tried to debug the issue, but did not get very far: I could not find out
where this hop limit comes from. I also failed to change the hop limit
with "route -6" or "ip -6 route" due to both commands disliking how I told
them abour routes (I couldn't figure out how to specify existing routes,
just got useless errors all the time).

I found some weird entries in "route -6":
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
::1/128                        ::                         U    256 0     0 lo
2a02:810c:86c0:ca::/64         ::                         Ue   256 0     0 wlan0
fe80::/64                      ::                         U    256 0     0 wlan0
::/0                           fe80::20c:42ff:fe34:855b   UG   1024 0     0 wlan0
::/0                           ::                         !n   -1  1   309 lo
::1/128                        ::                         Un   0   1     7 lo
2a02:810c:86c0:ca:511:cc78:59bd:57e4/128 ::                         Un   0   1    43 lo
2a02:810c:86c0:ca:fef8:aeff:fe51:889e/128 ::                         Un   0   1     0 lo
fe80::fef8:aeff:fe51:889e/128  ::                         Un   0   1    27 lo
ff00::/8                       ::                         U    256 0     0 wlan0
::/0                           ::                         !n   -1  1   309 lo

Note the two "reject" routes for ::/0 which the counter says are used all
the time - except that I actually do see packets on the wire with wireshark.
Also note I have no idea whether this is weird or a problem at all ;-)

"ip -6 route show" shows way less:
2a02:810c:86c0:ca::/64 dev wlan0  proto kernel  metric 256  expires 601727sec
fe80::/64 dev wlan0  proto kernel  metric 256
default via fe80::20c:42ff:fe34:855b dev wlan0  proto static  metric 1024

Kind regards
Ralf

#756534#10
Date:
2014-08-12 11:44:06 UTC
From:
To:
I can confirm I'm getting the same issue. (Running Jessie/Sid, with
network-manager Version: 0.9.4.0-10)

It appears that network manager will directly change the sysctl values
like thus:

# sysctl -A |grep -i hop_limit
net.ipv6.conf.all.hop_limit = 64
net.ipv6.conf.default.hop_limit = 64
net.ipv6.conf.eth0.hop_limit = 0
net.ipv6.conf.lo.hop_limit = 64
net.ipv6.conf.wlan0.hop_limit = 0

Once reset using a script or sysctl -w directly, once the interface is
brought back up (unplugged-replugged or wifi reconnect) it will reset
the value from 64 (or whatever) back to 0

I've had a look through the RedHat/Gnome NetworkManager git tree, but
cannot see any fix for this as yet. I have been unable to confirm if its
an issue with their source or if its a debian patch that has introduced
this.

Regards, Yinette.

#756534#15
Date:
2014-08-12 12:19:29 UTC
From:
To:
Actually, doing a little further poking around...

It looks like network-manager will set the hop limit based on what is
given by the router in the v6 router advertisement.

In my case, the local gateway will specify the hop-limit as 0 in its
advertisement, and network-manager will take it as gospel.

I reckon if the value received in a router advertisement is 0, it should
default to something like 64.

Best Regards,
Yinette

#756534#20
Date:
2014-08-27 19:01:56 UTC
From:
To:
Hi,
Interesting enough though, on a Fedora machine, a hop limit of 0 is not
a problem. Also, rdisc6 shows the 0 as "undefined", so it seems this is
a special value.

Kind regards
Ralf

#756534#25
Date:
2014-10-29 22:33:53 UTC
From:
To:
Seems this has been noticed and fixed upstream:

https://bugzilla.gnome.org/show_bug.cgi?id=737252

Over to you maintainer :)

- Yinette