Subject: problem with sys/net/if_tun.c revision 1.80
To: None <>
From: Jukka Salmi <>
List: current-users
Date: 03/03/2006 20:01:58

since I rebuilt my kernel using the latest sources vpnc
(pkgsrc/net/vpnc) doesn't work anymore; reverting sys/net/if_tun.c
back to revision 1.79 fixes the problem. I see this with kernels with
and without INET6.

When using if_tun.c 1.80, I seem to be able to connect the remote VPN,
but I can't send/receive any traffic. I don't see any error messages.
Setting tundebug=1 in the kernel shows success at first:

	tun0: open
	tun0: interface mtu set
	tun0: tuninit
	tun0: address set
	vpnc: local address for [...] is [...]
	vpnc: local address for [...] is [...]

but then looping endlessly over

	tun0: tunpoll
	tun0: tunpoll waiting
	tun0: tun_output
	tun0: tunpoll
	tun0: tunpoll q=1
	tun0: read

However, right after the initial vpnc connection succeeds, netstat

$ netstat -anf inet
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        State
udp      196      0  *.500                  *.*                   

With tun_if.c 1.80 there are no tunwrite() calls. With if_tun.c 1.79,
there are tunwrite() calls, and vpnc works fine.

I don't know how to debug this further... Any hints?

TIA, Jukka

bashian roulette:
$ ((RANDOM%6)) || rm -rf ~