go6.net v6udpv4 for NetBSD
When operating the tspc client for the go6.net software and your client is behind a NAT device the client needs to be able to use NAT-T for the 6in4 communication. By default the client only mentions Windows, Linux and FreeBSD as supporting the NAT-T feature for 6in4. However, I've discovered this is possible for NetBSD 4.0.1 which I'm currently running.
Basically the previous versions of NetBSD and OpenBSD (all versions) do not implement their tun devices with certain method calls needed to to perform NAT-T for the 6in4 communication which is normally done using protocol 41. With my Juniper NS-5GT performing PAT for outbound IPv4 traffic, internet protocol 41 is not usable and NAT-T is a must.
Since many of the BSDs are the same I started by reading many web post of the reasons why FreeNSD previously did not work. They specifically mentioned some ioctl(2) calls that were not available in the tun device header files (<net/if_tun.h>). Upon reading the TUN(4) man pages I discovered that on my 4.0.1 box these ioctl(2) calls were available and gave me reassurance that this could work.
I started by copying all files in 'tspc-advanced/platform/freebsd/* -> tspc-advanced/platform/netbsd' and making few changes to the Makefile and tsp_tun.c. Also, in the template directory freebsd was copied to netbsd and minor changes made. After this the v6udpv4 was possible and all was working as expected. Hacking has it's advantages when your trying to overcome a limitation.
I've attached the modified files in a tar archive which can be extracted in '/path/to/<gw6c-dir>/tspc-advanced/'. This was done using gw6c-5.1-RELEASE source tarball.
File: netbsd-tspc.tgz

RSS
