GNOME Bugzilla – Bug 752546
Adding new route fails
Last modified: 2015-08-06 16:14:28 UTC
Created attachment 307648 [details] Output of journalctl for NetworkManager NetworkManager fails to establish a PPTP connection due to failure in adding a static route. The connection is established when no route is configured.
Created attachment 307649 [details] PPTP connection configuration (minus sensitive information)
Hey. Don't you have a configuration error there? [vpn] gateway=some.ip.add.ress ^^^^^^^^^^^^^^^^ was this X.Y.Z.130? [ipv4] ignore-auto-routes=true route1=172.16.0.0/12,some.other.ip.address ^^^^^^^^^^^^^^^^^^^^^ strange. was this X.Y.Z.130 too?? <info> VPN Gateway: X.Y.Z.130 <info> Tunnel Device: ppp0 <info> IPv4 configuration: <info> Internal Address: 172.16.5.108 <info> Internal Prefix: 32 <info> Internal Point-to-Point Address: X.Y.Z.132 <info> Maximum Segment Size (MSS): 0 <info> Static Route: 172.16.0.0/12 Next Hop: X.Y.Z.130 <info> Forbid Default Route: yes <info> Internal DNS: 172.16.1.2 <info> DNS Domain: '(none)' If the VPN gateway is at X.Y.Z.130, then this address must be reached ~outside~ the VPN ... You cannot add another route to that (external gateway) ~inside the VPN~. I think you should add either have: [ipv4] route1=172.16.0.0/12,0.0.0.0 or some: [ipv4] route1=172.16.0.0/12,127.16.U.V But actually, I see a bug in your logfile. At [1437175733.971700], we wrongly delete another route. That is related to your setting of [ipv4] ignore-auto-routes=true and related to patch http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=79630c11e502c3b0b958abc0b1b5d777a3db2a98 That one needs fixing... Why did you configure ignore-auto-routes? Please also test with that parameter set to FALSE.
The configuration could be written that way too. But it used to work with the attached configuration. I also tried applying the changes you mentioned, and I'm still getting the same failure: "do-add-ip4-route: failure adding ip4-route"
And the issue doesn't disappear with ignore-auto-routes=FALSE. Unless I remove the manually added routes, in which case it disappears.
Pushed branch for review to fix the ignore-auto-routes issue. See th/device-ignore-auto-bgo752546
Looks good. Maybe it would be useful to launch automated tests with this patch and check that we aren't missing some special cases, as we had some failures related to this part in the past. I can do it if you prefer.
(In reply to Seyyed Mehran Kholdi from comment #3) > The configuration could be written that way too. But it used to work with > the attached configuration. > I also tried applying the changes you mentioned, and I'm still getting the > same failure: "do-add-ip4-route: failure adding ip4-route" You tried with [ipv4] route1=172.16.0.0/12,0.0.0.0 and then you still got the same failure? Can you attach the logfile for that please?
Nope, I actually tried with [ipv4] route1=172.16.0.0/12,172.16.0.1 (This same configuration is being used by my coworkers and it's working) You're right; changing the gateway to 0.0.0.0 (instead of 172.16.0.1) resolved the issue.
(In reply to Seyyed Mehran Kholdi from comment #8) > Nope, I actually tried with > > [ipv4] > route1=172.16.0.0/12,172.16.0.1 > > (This same configuration is being used by my coworkers and it's working) > > You're right; changing the gateway to 0.0.0.0 (instead of 172.16.0.1) > resolved the issue. If you configure a gateway (other then 0.0.0.0), that gateway must be reached directly on the interface. Kernel requires that, otherwise you are unable to add that route. so you would need something like: [ipv4] route1=172.16.0.0/12,172.16.0.1 route2=172.16.0.1/32,0.0.0.0 But since you have this point-to-point link, likely you don't need a gateway and 0.0.0.0 might be correct anyway. As to why it works with another version of NM or with your coworker, that is unclear.
I think the WWAN configs should also have routes/DNS removed based on the setting requests. The rest LGTM.
merged branch to: master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=558117222fabd8244e3d01e281c6391967b273c3 nm-1-0: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=bcc94bb989aef3ca32c8898e478b8984791c8c83
One issue was identified, and fixed. I don't think there is another issue here. I'm closing this BZ for now. Please feel free to reopen, or provide more information. Thank you.