From owner-freebsd-stable@FreeBSD.ORG Wed Aug 16 08:48:23 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D062316A4DD; Wed, 16 Aug 2006 08:48:23 +0000 (UTC) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C62143D45; Wed, 16 Aug 2006 08:48:19 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from atlantis.dp.ua (localhost [127.0.0.1]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k7G8kfkM057748; Wed, 16 Aug 2006 11:46:41 +0300 (EEST) (envelope-from dmitry@atlantis.dp.ua) Received: from localhost (dmitry@localhost) by atlantis.dp.ua (8.13.1/8.13.1/Submit) with ESMTP id k7G8kdLX057739; Wed, 16 Aug 2006 11:46:39 +0300 (EEST) (envelope-from dmitry@atlantis.dp.ua) Date: Wed, 16 Aug 2006 11:46:39 +0300 (EEST) From: Dmitry Pryanishnikov To: Yar Tikhiy In-Reply-To: <20060816081130.GB81271@comp.chem.msu.su> Message-ID: <20060816113606.P29626@atlantis.atlantis.dp.ua> References: <20060815040736.2f85f090.drl@MyBSD.org.my> <9405D801-3435-419A-9541-E1A9B2CF26D2@lassitu.de> <20060816081130.GB81271@comp.chem.msu.su> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: drl@MyBSD.org.my, brooks@freebsd.org, freebsd-stable@freebsd.org, Stefan Bethke , thompsa@freebsd.org Subject: Re: Default route (IPv4) demolished by destroying clone (gif/gre) interface X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 08:48:23 -0000 Hello! On Wed, 16 Aug 2006, Yar Tikhiy wrote: > The question is: Do all the routes really need to be flushed upon > the destruction of an interface? I've killed devd on my test machine (yesterday's RELENG_6) and done the following: root@test# ifconfig vlan0 create root@test# ifconfig vlan0 inet 10.1.1.1/30 root@test# route add 10.2.2.0/24 10.1.1.1 add net 10.2.2.0: gateway 10.1.1.1 root@test# nst -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 193.108.47.145 UGS 0 64439 rl0 10.0.0.252/30 link#1 UC 0 0 fxp0 10.1.1/30 link#4 UC 0 0 vlan0 10.1.1.1 00:00:00:00:00:00 UHLW 2 0 lo0 10.2.2/24 10.1.1.1 UGS 0 0 vlan0 127.0.0.1 127.0.0.1 UH 0 0 lo0 193.108.47.144/29 link#2 UC 0 0 rl0 193.108.47.145 00:02:b3:8b:26:4a UHLW 2 20523 rl0 38 root@test# ifconfig vlan0 destroy root@test# nst -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 193.108.47.145 UGS 0 64500 rl0 10.0.0.252/30 link#1 UC 0 0 fxp0 127.0.0.1 127.0.0.1 UH 0 0 lo0 193.108.47.144/29 link#2 UC 0 0 rl0 193.108.47.145 00:02:b3:8b:26:4a UHLW 2 20571 rl0 58 So it seems that just simple 'ifconfig vlan0 destroy' already takes care about all the routes via the defunct interface, and does this correctly. The question is whether interface auto-destruction code in kernel does the same. I don't have removable NIC hardware handy to check this. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE