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 788137 - Openvpn Routes are limited to 255
Openvpn Routes are limited to 255
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: openvpn
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-25 14:16 UTC by aknarts@aknarts.com
Modified: 2017-10-05 10:28 UTC
See Also:
GNOME target: ---
GNOME version: 3.23/3.24


Attachments
NetworkManagerLog (62.40 KB, text/x-log)
2017-09-25 14:16 UTC, aknarts@aknarts.com
Details

Description aknarts@aknarts.com 2017-09-25 14:16:25 UTC
Created attachment 360358 [details]
NetworkManagerLog

When connecting to VPN that pushes more than 255 routes only the first 254 are added.

Invoking the openvpn client from the command line does add the routes correctly.

I am not sure how much I can disclose from the logs, but as far as I could see there was no error. 

Config:
[connection]
id=vpn-connection
uuid=4915b0be-25d5-4fa5-90e4-8ad755eec46d
type=vpn
permissions=
timestamp=1506346097

[vpn]
ca=/home/user/.openvpn/ca.crt
cert=/home/user/.openvpn/user.crt
key=/home/user/.openvpn/user.key
cert-pass-flags=0
comp-lzo=adaptive
connection-type=tls
dev=tun
dev-type=tun
max-routes=5000
ping-restart=30
remote=endpoint:port
service-type=org.freedesktop.NetworkManager.openvpn

[ipv4]
dns-search=
method=auto
never-default=true

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
Comment 1 Thomas Haller 2017-09-25 15:09:17 UTC
> 255 routes only the first 254 are added.

are you sure about 254? I think the first 255 are added, no?
Comment 2 Thomas Haller 2017-09-25 15:17:50 UTC
please review th/helper-parse-route-bgo788137

https://git.gnome.org/browse/network-manager-openvpn/log/?h=th/helper-parse-route-bgo788137
Comment 3 aknarts@aknarts.com 2017-09-25 16:05:23 UTC
(In reply to Thomas Haller from comment #1)
> > 255 routes only the first 254 are added.
> 
> are you sure about 254? I think the first 255 are added, no?

Yes it felt like one off, might have counted it wrong(Hence the attached log)
Comment 4 Thomas Haller 2017-09-25 16:14:03 UTC
(In reply to aknarts@aknarts.com from comment #3)
> (In reply to Thomas Haller from comment #1)
> > > 255 routes only the first 254 are added.
> > 
> > are you sure about 254? I think the first 255 are added, no?
> 
> Yes it felt like one off, might have counted it wrong(Hence the attached log)

ah. I missed the attached logfile. It's 255 routes there (not 254). As expected.

Thanks
Comment 5 Beniamino Galvani 2017-09-26 11:47:20 UTC
(In reply to Thomas Haller from comment #2)
> please review th/helper-parse-route-bgo788137
> 
> https://git.gnome.org/browse/network-manager-openvpn/log/?h=th/helper-parse-
> route-bgo788137

 static GVariant *
 get_ip6_routes (void)
 {
 ...
+		gs_strfreev char *dst = NULL;

gs_free ?

The rest LGTM.
Comment 7 Thomas Haller 2017-10-05 10:28:48 UTC
There is a necessary follow-up fix: https://git.gnome.org/browse/network-manager-openvpn/commit/?id=e4d8cda14483b3195dbf2a9d61c565f426108ea3