From owner-freebsd-net@FreeBSD.ORG Fri Feb 9 12:43:18 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD79016A400 for ; Fri, 9 Feb 2007 12:43:18 +0000 (UTC) (envelope-from tomas@tutus.se) Received: from fw-y.tutus.se (static-213-115-50-13.sme.bredbandsbolaget.se [213.115.50.13]) by mx1.freebsd.org (Postfix) with ESMTP id 7701913C4A7 for ; Fri, 9 Feb 2007 12:43:17 +0000 (UTC) (envelope-from tomas@tutus.se) Received: from munin.tutus.se (munin.tutus.se [193.181.0.67]) by fw-y.tutus.se (omb_smtp 1.7) with ESMTP; (cipher=AES256-SHA from= verify=NO) Fri, 09 Feb 2007 13:26:29 +0100 (CET) Received: from [193.181.0.112] ([193.181.0.112]) by munin.tutus.se (8.13.6.20060614/8.13.6) with ESMTP id l19CQNZn006932 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 9 Feb 2007 13:26:26 +0100 (CET) Message-ID: <45CC686F.1050409@tutus.se> Date: Fri, 09 Feb 2007 13:26:23 +0100 From: Tomas Svensson User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: problem with ng_device as tun replacement X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2007 12:43:18 -0000 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