Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Feb 2007 13:26:23 +0100
From:      Tomas Svensson <tomas@tutus.se>
To:        freebsd-net@freebsd.org
Subject:   problem with ng_device as tun replacement
Message-ID:  <45CC686F.1050409@tutus.se>

next in thread | raw e-mail | index | archive | help
Hi,

I am trying to replace the tun interface using netgraph by linking 
ng_device and ng_iface:

ngctl mkpeer iface dummy inet
ngctl mkpeer ng0: device inet inet

then I try to use it as a drop-in replacement for tun, but it doesn't 
really work:

1. If I send an IP packet through /dev/ngd0 (after doing a normal 
open()), the packet doesn't get sent until I write a second packet to 
the device.

2. If i route packets to ng0: it works even worse, with very long and 
strange delays.

I can do the same with tun and it works fine. I also tried using the 
netgraph user library to open a socket, and this works too (but I can't 
use it since the performance is very poor). 

Any ideas?

-Tomas




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45CC686F.1050409>