Bug 443312 - NM doesn't remove direct route to openVPN gw when disconnecting
Summary: NM doesn't remove direct route to openVPN gw when disconnecting
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: F9Target
TreeView+ depends on / blocked
 
Reported: 2008-04-20 15:14 UTC by Fabrice Bellet
Modified: 2008-05-19 15:28 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2008-05-19 15:28:36 UTC


Attachments (Terms of Use)

Description Fabrice Bellet 2008-04-20 15:14:01 UTC
The affected version is svn3578. I'm running an openvpn tunnel over a broadband
ppp connection. When closing the VPN connection, the direct route to the VPN
gateway via the ppp0 device is not removed. It works fine with VPN over
Ethernet, and the problem occurs then the VPN is established over a ppp device.

After playing a bit with the code dealing with libnl, I came to this
modification that works for me, both with point-to-point and ethernet link:

--- NetworkManager-0.7.0.orig/src/NetworkManagerSystem.c        2008-04-15
22:50:36.000000000 +0200
+++ NetworkManager-0.7.0/src/NetworkManagerSystem.c     2008-04-19
17:14:59.000000000 +0200
@@ -190,11 +190,8 @@
        struct rtnl_addr *addr = (struct rtnl_addr *) object;
        int err;
 
-       /* Delete addresses on this interface which don't match the one we
-        * are about to add to it.
-        */
-       if (nl_object_identical ((struct nl_object *) data->match, (struct
nl_object *) addr))
-               return;
+       /* Delete addresses on this interface */
+       
        if (rtnl_addr_get_ifindex (addr) != rtnl_addr_get_ifindex (data->match))
                return;
        if (rtnl_addr_get_family (addr) != rtnl_addr_get_family (data->match))


Moreover, after openvpn initialization completes, I have this WARN in my log :

Apr 19 17:03:14 localhost nm-openvpn[13923]: Initialization Sequence Completed
Apr 19 17:03:14 localhost NetworkManager: <WARN> 
nm_system_vpn_device_set_from_ip4_config(): error -17 returned from
rtnl_addr_add():#012Sucess#012
Apr 19 17:03:15 localhost NetworkManager: <info>  VPN connection 'creatis' (IP
Config Get) complete.
Apr 19 17:03:15 localhost NetworkManager: <info>  VPN plugin state changed: 4

And removing this call to rtnl_addr_add() in the function
nm_system_vpn_device_set_from_ip4_config() also works for me, without loosing
the neeeded routes and the IP configuration of my VPN client.

Comment 1 John Poelstra 2008-04-21 17:34:46 UTC
thank you for reporting this bug

Comment 2 Bug Zapper 2008-05-14 09:47:34 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Fabrice Bellet 2008-05-19 12:28:43 UTC
the bug is resolved for me in version svn3669

Comment 4 Dan Williams 2008-05-19 15:28:36 UTC
great, thanks.  closing then.


Note You need to log in before you can comment on or make changes to this bug.