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 752546 - Adding new route fails
Adding new route fails
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: pptp
1.0.x
Other Linux
: Normal major
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-07-17 23:39 UTC by Seyyed Mehran Kholdi
Modified: 2015-08-06 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output of journalctl for NetworkManager (243.97 KB, text/x-log)
2015-07-17 23:39 UTC, Seyyed Mehran Kholdi
Details
PPTP connection configuration (minus sensitive information) (565 bytes, text/plain)
2015-07-17 23:42 UTC, Seyyed Mehran Kholdi
Details

Description Seyyed Mehran Kholdi 2015-07-17 23:39:08 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.
Comment 1 Seyyed Mehran Kholdi 2015-07-17 23:42:35 UTC
Created attachment 307649 [details]
PPTP connection configuration (minus sensitive information)
Comment 2 Thomas Haller 2015-08-04 16:45:55 UTC
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.
Comment 3 Seyyed Mehran Kholdi 2015-08-04 19:04:47 UTC
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"
Comment 4 Seyyed Mehran Kholdi 2015-08-04 19:09:20 UTC
And the issue doesn't disappear with ignore-auto-routes=FALSE. Unless I remove the manually added routes, in which case it disappears.
Comment 5 Thomas Haller 2015-08-05 09:13:05 UTC
Pushed branch for review to fix the ignore-auto-routes issue. See th/device-ignore-auto-bgo752546
Comment 6 Beniamino Galvani 2015-08-05 12:52:08 UTC
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.
Comment 7 Thomas Haller 2015-08-05 16:35:13 UTC
(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?
Comment 8 Seyyed Mehran Kholdi 2015-08-05 17:03:41 UTC
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.
Comment 9 Thomas Haller 2015-08-05 21:16:24 UTC
(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.
Comment 10 Dan Williams 2015-08-06 15:50:47 UTC
I think the WWAN configs should also have routes/DNS removed based on the setting requests.  The rest LGTM.
Comment 12 Thomas Haller 2015-08-06 16:14:28 UTC
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.