Bug 175067 - sysutils/vpnc-scripts: vpnc-disconnect does not terminate vpnc daemon
Summary: sysutils/vpnc-scripts: vpnc-disconnect does not terminate vpnc daemon
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-06 18:30 UTC by 33n5ps+89brie9u1qz9g
Modified: 2013-01-30 12:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 33n5ps+89brie9u1qz9g 2013-01-06 18:30:00 UTC
After starting VPN client (vpnc), I'm not able to terminate the vpnc
using vpnc-disconnect.  vpnc-disconnect displays message about
terminating vpnc daemon, but the vpnc program is still running.
Network interfaces (tun0 and tun1) created by vpnc are not destroyed.

Fix: 

Workaround:

# killall -9 vpnc

tun0 is destroyed automatically

# ifconfig tun1 destroy
How-To-Repeat: 
My /usr/local/etc/vpnc.conf has the following fields:

IPSec gateway
IPSec ID
IPSec secret
Xauth username
Xauth password


There are no tun interfaces, neither vpnc is running.

Below is the copy/paste from the terminal without irrelevant lines
(other interfaces than tun, vpnc routing info)

# vpnc
Warning: using insecure memory!
VPNC started in background (pid: 26056)...

# ifconfig
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1412
	options=80000<LINKSTATE>
	inet a.b.c.d --> a.b.c.d netmask 0xffffffff
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	Opened by PID 25762
tun1: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
	options=80000<LINKSTATE>
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

# ps aux |  grep vpnc
root       26056   0.0  0.0  19688   1904 ??  Is    6:10PM   0:00.00 vpnc
root       26072   0.0  0.0  16288   1616  3  S+    6:14PM   0:00.00 grep vpnc


# vpnc-disconnect
Terminating vpnc daemon (pid: 26056)

# ps aux |  grep vpnc
root       26056   0.0  0.0  19688   1948 ??  Is    6:10PM   0:00.00 vpnc
root       26075   0.0  0.0  14508   1852 ??  I     6:14PM   0:00.02 /bin/sh /usr/local/sbin/vpnc-script
root       27832   0.0  0.0  10164   1436  3  R+    6:15PM   0:00.00 grep vpnc

# ifconfig
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1412
	options=80000<LINKSTATE>
	inet a.b.c.d --> a.b.c.d netmask 0xffffffff
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	Opened by PID 25762
tun1: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
	options=80000<LINKSTATE>
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-07 03:46:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ehaupt

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Emanuel Haupt freebsd_committer freebsd_triage 2013-01-19 13:39:22 UTC
State Changed
From-To: open->analyzed

Was able to confirm the issue. Contacted maintainer of sysutils/vpnc-scripts.
Comment 3 Emanuel Haupt freebsd_committer freebsd_triage 2013-01-22 15:53:35 UTC
Could you please try the following patch?

http://people.freebsd.org/~ehaupt/misc/vpnc2/vpnc-script.diff
Comment 4 33n5ps+89brie9u1qz9g 2013-01-22 22:56:45 UTC
I tested the patch and it seem to work well.  Thank you.


BTW: I was browsing PRs and the description kern/173475 looks similar.
Perhaps the patch solves that problem too.
Comment 5 Emanuel Haupt freebsd_committer freebsd_triage 2013-01-24 08:58:23 UTC
Responsible Changed
From-To: ehaupt->zi

Over to sysutils/vpnc-scripts maintainer. Suggest the following patch: http://people.freebsd.org/~ehaupt/patches/vpnc-scripts.patch
Comment 6 Ryan Steinmetz freebsd_committer freebsd_triage 2013-01-30 12:37:30 UTC
State Changed
From-To: analyzed->closed

sysutils/vpnc-scripts was updated to 20130129, which resolves this 
issue.  Thank you for the report.