Subject: Re: problem with sys/net/if_tun.c revision 1.80
To: None <current-users@netbsd.org>
From: Rui Paulo <rpaulo@fnop.net>
List: current-users
Date: 03/04/2006 01:35:23
Jukka Salmi <j+nbsd@2006.salmi.ch> writes:

> Hi,
>
> 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
> prints
>
> $ 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?

Ok, I'm currently debugging this. Teredo doesn't work too, the packets
are garbled.

-- 
  Rui Paulo			<rpaulo@{NetBSD{,-PT}.org,fnop.net}>