Bug 766340 - nm-openvpn-service-openvpn-helper forgetting ifconfig_local and ifconfig_remote on restart
Summary: nm-openvpn-service-openvpn-helper forgetting ifconfig_local and ifconfig_remo...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-openvpn
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-11 19:06 UTC by Kapetanakis Giannis
Modified: 2013-11-23 21:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-31 23:33:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kapetanakis Giannis 2011-12-11 19:06:14 UTC
Fedora 16 up2date,
NetworkManager-openvpn-0.9.0-1.fc16.x86_64

When the connection does a ping-restart the helper is called like this:

/usr/libexec/nm-openvpn-service-openvpn-helper tun0 1500 1558 10.1.1.6 10.1.1.5 restart

However I get:

Dec 11 20:41:22 localhost nm-openvpn[6423]: /usr/libexec/nm-openvpn-service-openvpn-helper tun0 1500 1558 10.1.1.6 10.1.1.5 restart
Dec 11 20:41:22 localhost NetworkManager[1090]: ** (process:6558): WARNING **: nm-openvpn-service-openvpn-helper did not receive a valid IP4 Address from openvpn
Dec 11 20:41:22 localhost NetworkManager[1090]: <warn> VPN plugin failed: 2
Dec 11 20:41:22 localhost NetworkManager[1090]: NetworkManager[1090]: <warn> VPN plugin failed: 2
Dec 11 20:41:22 localhost nm-openvpn[6423]: WARNING: Failed running command (--up/--down): external program exited with error status: 1
Dec 11 20:41:22 localhost nm-openvpn[6423]: Exiting


Dumping the env from nm-openvpn-service-openvpn-helper and indeed on init I have both ifconfig_local and ifconfig_remote. On restart these two are missing even though they are passed as arguments.

If I manually ad them then restart works:
/usr/libexec/nm-openvpn-service-openvpn-helper:

#!/bin/sh
#date=`date +%F-%R:%S`
#env > /tmp/openvpn.env.$date

export ifconfig_local=10.1.1.6
export ifconfig_remote=10.1.1.5

/usr/libexec/nm-openvpn-service-openvpn-helper.ORIG $@

regards,

Giannis

Comment 1 Kapetanakis Giannis 2011-12-11 19:08:07 UTC
Maybe on restart the helper should get those from argv and not from getenv.

Comment 2 Kapetanakis Giannis 2012-06-25 17:00:14 UTC
This remains unresolved on F17

Jun 25 19:52:42 localhost nm-openvpn[2174]: [server] Inactivity timeout (--ping-restart), restarting
Jun 25 19:52:42 localhost nm-openvpn[2174]: SIGUSR1[soft,ping-restart] received, process restarting
Jun 25 19:52:44 localhost nm-openvpn[2174]: WARNING: Make sure you understand the semantics of --tls-remote before using it (see the man page).
Jun 25 19:52:44 localhost nm-openvpn[2174]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Jun 25 19:52:44 localhost nm-openvpn[2174]: Re-using SSL/TLS context
Jun 25 19:52:44 localhost nm-openvpn[2174]: LZO compression initialized
Jun 25 19:52:44 localhost nm-openvpn[2174]: UDPv4 link local: [undef]
Jun 25 19:52:44 localhost nm-openvpn[2174]: UDPv4 link remote: 192.168.1.1:1234
Jun 25 19:52:47 localhost nm-openvpn[2174]: [server] Peer Connection Initiated with 192.168.1.1:1234
Jun 25 19:52:49 localhost nm-openvpn[2174]: Preserving previous TUN/TAP instance: tun0
Jun 25 19:52:49 localhost nm-openvpn[2174]: /usr/libexec/nm-openvpn-service-openvpn-helper tun0 1500 1558 10.1.1.6 10.1.1.5 restart
Jun 25 19:52:49 localhost NetworkManager[796]: <warn> VPN plugin failed: 2
Jun 25 19:52:49 localhost nm-openvpn[2174]: WARNING: Failed running command (--up/--down): external program exited with error status: 1
Jun 25 19:52:49 localhost nm-openvpn[2174]: Exiting

Mangling with the helper as in #1 fixes the problem again...

Comment 3 Kapetanakis Giannis 2012-06-25 17:46:00 UTC
No, my fix introduces another problem. I loose the routes to the VPN server (those routes that are pushed from VPN). For a moment I ping the VPN (on restart) then I loose everything.


Jun 25 20:38:05 localhost NetworkManager[796]: <info> VPN connection 'VPN' (IP Config Get) reply received.
Jun 25 20:38:05 localhost nm-openvpn[2868]: Initialization Sequence Completed
Jun 25 20:38:05 localhost NetworkManager[796]: <info> VPN Gateway: 192.168.1.1
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Internal Gateway: 10.1.1.5
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Tunnel Device: tun0
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Internal IP4 Address: 10.1.1.6
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Internal IP4 Prefix: 32
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Internal IP4 Point-to-Point Address: 10.1.1.5
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Maximum Segment Size (MSS): 0
Jun 25 20:38:05 localhost NetworkManager[796]: <info> Forbid Default Route: no
Jun 25 20:38:05 localhost NetworkManager[796]: <info> DNS Domain: '(none)'
Jun 25 20:38:06 localhost NetworkManager[796]: <error> [1340645886.449167] [nm-system.c:147] nm_system_device_set_ip4_route(): (wlan0): failed to set IPv4 route: Object exists
Jun 25 20:38:06 localhost NetworkManager[796]: <info> VPN connection 'VPN' (IP Config Get) complete.

Comment 4 Fedora End Of Life 2013-07-03 21:59:01 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2013-07-31 23:33:35 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Brad 2013-11-23 21:05:51 UTC
This is still reproducible in F19.  Can we re-open?  Should we refile?


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