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 545912 - openvpn/tun0 device not in policy->manager list of devices
openvpn/tun0 device not in policy->manager list of devices
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2008-08-01 20:28 UTC by Fabrice Bellet
Modified: 2008-10-11 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
update device->ip_iface of the active device when vpn replaces the default route (827 bytes, patch)
2008-08-02 21:21 UTC, Fabrice Bellet
none Details | Review
add a vpn-iface to nm-device (2.27 KB, patch)
2008-10-10 08:28 UTC, Fabrice Bellet
none Details | Review

Description Fabrice Bellet 2008-08-01 20:28:07 UTC
Please describe the problem:
Hi,

The problems happens with svn 3882.

here is the case : a tun0 openvpn interface is running on top of real device eth0, the default route is through the tun0 iface (no static route is sent by openvpn, so nm_system_device_replace_default_ip4_route() is called at the end of nm_system_vpn_device_set_from_ip4_config().

Now, a wlan0 device is configured as a shared device. When this device enters stage 5, update_routing_and_dns() is called, and here, the vpn tun0 iface is not considered as the _best_ default route. The loop iterates over eth0, and chooses eth0 as the best default route. 

The default route is then changed from tun0 to eth0, which is not the expected behaviour is this case.



Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Fabrice Bellet 2008-08-02 21:16:32 UTC
could this be caused because dev->priv->ip_iface == null for device eth0 ? the following patch works for me, it sets ip_iface to 'tun0' when the default route is replaced by the tunnel iface tun0.
Comment 2 Fabrice Bellet 2008-08-02 21:21:35 UTC
Created attachment 115746 [details] [review]
update device->ip_iface of the active device when vpn replaces the default route
Comment 3 Dan Williams 2008-08-04 15:16:01 UTC
Thanks for the report, definitely the wrong behavior on NM's part.  I'll have to investigate a bit more, but I'm a bit worried about the side-effects of setting a real device's ip_iface.  That won't work when the VPN connection is over 3G/PPP, since for those devices ip_iface is "ppp0" for example.  So there's probably a better way to handle this given that VPN interfaces aren't real "devices".  Will look into it.
Comment 4 Fabrice Bellet 2008-10-10 08:28:13 UTC
Created attachment 120322 [details] [review]
add a vpn-iface to nm-device

I use this patch with some success since a few weeks. It works in the case of a 3G/gsm connection (ppp0), with a vpn connection (tun0) having the default route. It's a bit different from the previous patch, in the sense that it changes the behaviour of nm_device_get_ip_iface().
Comment 5 Dan Williams 2008-10-11 14:04:43 UTC
fixed in NM svn r4167