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 793962 - Host route not added for IPv6
Host route not added for IPv6
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: openvpn
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-03-01 18:03 UTC by Mantas Mikulėnas (grawity)
Modified: 2018-03-05 17:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NM debug log (34.56 KB, text/x-log)
2018-03-01 18:03 UTC, Mantas Mikulėnas (grawity)
  Details
[PATCH] platform: don't require cloned flag for RTM_GETROUTE IPv6 result (5.14 KB, patch)
2018-03-05 13:35 UTC, Beniamino Galvani
none Details | Review

Description Mantas Mikulėnas (grawity) 2018-03-01 18:03:42 UTC
Created attachment 369159 [details]
NM debug log

When connecting to an OpenVPN server over IPv6, NetworkManager fails to add a host route to it and shows the following warning:

> platform: route: get IPv6 route for: 2001:778:e27f::253 failed with unspecified

Since the VPN server pushes a route for 2001:778:e27f::/48, OpenVPN traffic ends up going through the VPN, as a result nothing works.

Oddly, just two lines above that, the debug log claims that it has successfully added the route...

> platform: signal: route   6   added: 2001:778:e27f::253/128 via fe80::6e3b:6bff:fe4c:3b9d dev 4 metric 600 mss 0 rt-src rt-ra src ::/128 pref-src 2a06:e881:108:2:318f:9ad4:c0bb:c003

...but the route never reaches the kernel – I do not see it in `ip monitor`.

IPv4 OpenVPN gateways are unaffected. This is *similar* to bug 785667, but it doesn't seem like an exact duplicate, as all my connections (wlan0, vmbr, even the VPN itself) are dual-stack.

networkmanager 1.11.1dev.r762.g608dfacb0
linux 4.15.5
Comment 1 Beniamino Galvani 2018-03-05 10:18:50 UTC
(In reply to Mantas Mikulėnas (grawity) from comment #0)
> When connecting to an OpenVPN server over IPv6, NetworkManager fails to add
> a host route to it and shows the following warning:
> 
> > platform: route: get IPv6 route for: 2001:778:e27f::253 failed with unspecified
> 
> Since the VPN server pushes a route for 2001:778:e27f::/48, OpenVPN traffic
> ends up going through the VPN, as a result nothing works.
> 
> Oddly, just two lines above that, the debug log claims that it has
> successfully added the route...
> 
> > platform: signal: route   6   added: 2001:778:e27f::253/128 via fe80::6e3b:6bff:fe4c:3b9d dev 4 metric 600 mss 0 rt-src rt-ra src ::/128 pref-src 2a06:e881:108:2:318f:9ad4:c0bb:c003

I think this is actually the result of the RTM_GETROUTE request to kernel that is wrongly considered as a new route and not as the response to the request because the following check in event_valid_msg() fails:

  if (NM_FLAGS_HAS (obj->ip_route.r_rtm_flags, RTM_F_CLONED)) {

Probably there is a bug somewhere in platform code...
Comment 2 Beniamino Galvani 2018-03-05 13:35:50 UTC
Created attachment 369337 [details] [review]
[PATCH] platform: don't require cloned flag for RTM_GETROUTE IPv6 result
Comment 3 Thomas Haller 2018-03-05 14:56:43 UTC
(In reply to Beniamino Galvani from comment #2)
> Created attachment 369337 [details] [review] [review]
> [PATCH] platform: don't require cloned flag for RTM_GETROUTE IPv6 result

lgtm
Comment 4 Beniamino Galvani 2018-03-05 17:56:35 UTC
Applied to master:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=2d1fad641b950520bec1a87c450d0e3b1439e262

and nm-1-10. The issue should be fixed now, please reopen if needed.