From owner-freebsd-net@FreeBSD.ORG Wed Jul 12 06:31:44 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9D3716A4DE for ; Wed, 12 Jul 2006 06:31:44 +0000 (UTC) (envelope-from rdenis@simphalempin.com) Received: from 25.mail-out.ovh.net (25.mail-out.ovh.net [213.186.37.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05FE743D66 for ; Wed, 12 Jul 2006 06:31:41 +0000 (GMT) (envelope-from rdenis@simphalempin.com) Received: (qmail 19406 invoked by uid 503); 12 Jul 2006 05:39:16 -0000 Received: (QMFILT: 1.0); 12 Jul 2006 05:39:16 -0000 Received: from b6.ovh.net (HELO mail83.ha.ovh.net) (213.186.33.56) by 25.mail-out.ovh.net with SMTP; 12 Jul 2006 05:39:16 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 12 Jul 2006 06:31:29 -0000 Received: from esprx01x.nokia.com (esprx01x.nokia.com [192.100.124.218]) by ssl0.ovh.net (IMP) with HTTP for ; Wed, 12 Jul 2006 09:31:29 +0300 Message-ID: <1152685889.44b49741482eb@ssl0.ovh.net> Date: Wed, 12 Jul 2006 09:31:29 +0300 From: Remi Denis-Courmont To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Originating-IP: 192.100.124.218 Subject: [if_tun] Could tunclose remove all kind of routing infos? 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: Wed, 12 Jul 2006 06:31:44 -0000 Hi, Is there any reason why, when bringing down a tunnel device, tunclose() from src/sys/net/if_tun.c only removes routing entries of the AF_INET family? It seems to be an omission: There is pretty much the same code in tapclose() from src/sys/net/if_tap.c; but that one removes all entries, regardless of the address family. I have problems because of this, as I am using if_tun with IPv6 at the moment, and the kernel does not cleanup routes when the tunneling program dies (PR kern/100080). Would there be any problem in removing the "if (ifa->ifa_addr->sa_family == AF_INET)" line in the TAILQ_FOREACH loop? Regards, -- Remi Denis-Courmont http://www.simphalempin.com/home/