NetworkManager add unnecessary route entry for VPN connection

Bug #301669 reported by Volodymyr Palii
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NetworkManager-OpenVPN
New
Undecided
Unassigned
network-manager-pptp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: network-manager-pptp

On Intrepid:

oberon@titania:/$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

With package:

oberon@titania:~$ apt-cache policy network-manager-pptp
network-manager-pptp:
  Installed: 0.7~~svn20081015t024626-0ubuntu1.8.10.1
  Candidate: 0.7~~svn20081015t024626-0ubuntu1.8.10.1
  Version table:
 *** 0.7~~svn20081015t024626-0ubuntu1.8.10.1 0
        500 http://ua.archive.ubuntu.com intrepid-proposed/universe Packages
        100 /var/lib/dpkg/status
     0.7~~svn20081015t024626-0ubuntu1 0
        500 http://ua.archive.ubuntu.com intrepid/universe Packages

Before connection to VPN server is established, routing table look like:

oberon@titania:/$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.5.40.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 10.5.40.1 0.0.0.0 UG 0 0 0 eth0

And after it is established:

oberon@titania:/$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.5.20.1 10.5.40.1 255.255.255.255 UGH 0 0 0 eth0
172.16.1.1 10.5.40.1 255.255.255.255 UGH 0 0 0 eth0
10.5.40.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0

For make connection to work, I need to delete bogus route:

oberon@titania:~$ sudo route del 172.16.1.1

description: updated
Revision history for this message
conan (ubuntu-conans) wrote :

I'd like to confirm I have the same bug using 64bit Intrepid with all updates as of 11th December 2008.

I can resolve the issue by placing a script in /etc/ppp/ip-up.d/ that removes the erroneous route with "route del foo"

Revision history for this message
Paulus (paulmd-ya) wrote :

The bug seems to be rather global in NetworkManager. It also happens in n-m-openvpn:

VPN disconnected:
celestia:~# ip ro
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.137 metric 2
default via 192.168.1.1 dev wlan0 proto static

VPN connected:
celestia:~# ip ro
x.x.x.x via 192.168.1.1 dev wlan0 proto static
x.x.x.x via 192.168.1.1 dev tun0 proto static
192.168.1.1 dev tun0 proto static scope link
10.0.1.1 dev tun0 proto kernel scope link src x.x.x.x
x.x.x.x/x via 10.0.1.1 dev tun0 proto static
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.137 metric 2
default via 192.168.1.1 dev wlan0 proto static

The third line must not be there, otherwise I can connect neither to VPN hosts nor to other hosts
in the net.

The hack-solution is to add these:
    vpn-up)
        /bin/ip ro del 192.168.1.1 dev tun0
        ;;

to /etc/NetworkManager/dispatcher.d/01ifupdown but the proper solution is not to add
broken routes in the first place.

Revision history for this message
Paulus (paulmd-ya) wrote :

Sorry, forgot to post the versions

celestia:~# dpkg -l *network-manager* | grep ii
ii network-manager 0.7.1~rc4.1.cf199a964-0ubuntu2 network management framework daemon
ii network-manager-gnome 0.7.1~rc4.1-0ubuntu2 network management framework (GNOME frontend
ii network-manager-openvpn 0.7.1~rc4.1.20090323+bzr27-0ubuntu2 network management framework (OpenVPN plugin

Revision history for this message
Reece (reece) wrote :

Same bug here (nm 0.7.1~rc4).

Paulus's edit to 01ifupdown works great. (Thanks!)

I'd love to see a "Set default route" option as part of the config, defaulting to off for consistency with the openvpn command line client.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager-pptp (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.