From owner-freebsd-net@FreeBSD.ORG Sat Oct 29 12:23:19 2005 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 74EF516A41F for ; Sat, 29 Oct 2005 12:23:19 +0000 (GMT) (envelope-from suz@alaxala.net) Received: from pc1.alaxala.kame.net (kame219.kame.net [203.178.141.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBCD043D48 for ; Sat, 29 Oct 2005 12:23:18 +0000 (GMT) (envelope-from suz@alaxala.net) Received: from localhost (localhost [127.0.0.1]) by pc1.alaxala.kame.net (Postfix) with ESMTP id D170762B4; Sat, 29 Oct 2005 21:24:25 +0900 (JST) Received: from pc1.alaxala.kame.net ([127.0.0.1]) by localhost (pc1.alaxala.kame.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 63699-04; Sat, 29 Oct 2005 21:24:21 +0900 (JST) Received: from flora220.uki-uki.net (240.163.192.61.tokyo.global.alpha-net.ne.jp [61.192.163.240]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pc1.alaxala.kame.net (Postfix) with ESMTP id 6F99B62B9; Sat, 29 Oct 2005 21:24:21 +0900 (JST) Date: Sat, 29 Oct 2005 21:22:08 +0900 Message-ID: From: SUZUKI Shinsuke To: craig@olyun.gank.org X-cite: xcite 1.33 In-Reply-To: <20051028211416.GA59989@nowhere> References: <20051028012957.GA50419@nowhere> <20051028040901.GA47012@nowhere> <20051028211416.GA59989@nowhere> User-Agent: Wanderlust/2.15.1 (Almost Unreal) Emacs/22.0 Mule/5.0 (SAKAKI) Organization: Technical Marketing Dept., ALAXALA Networks Corporation MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: amavisd-new at alaxala.kame.net Cc: freebsd-net@freebsd.org Subject: Re: 6.0-RC1 IPv6 losing local subnet route 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: Sat, 29 Oct 2005 12:23:19 -0000 Hello all, >>>>> On Fri, 28 Oct 2005 16:14:16 -0500 >>>>> craig@olyun.gank.org(Craig Boston) said: > Knowing that, I can cause it to happen on command by manually > re-configuring an interface with an address it already has: > # ifconfig em1 inet6 2002:abcd:ef01:5555::20 > (routes are all normal) > # ifconfig em1 inet6 2002:abcd:ef01:5555::20 > (prefix route disappears) I could reproduce your problem, and found out the reason: it's a bug, not a feature. In this case, the second ifconfig command removes the old address and then installs the new one (actually the same one again). Within kernel, however, the prefix route is completely removed after 1[s] by nd6_timer() (this 1[s] timer is set in in6.c in6_control() l.710). This route-removing timer is invoked after the addition of new address, and removes the prefix route. (prefix lifetime is not properly managed in case of a statically configured address) Here's the list of possible solutions. I'm now working on the second one. But if you need an immediately solution for 6.0-RELEASE, please consider the first one. - in ifconfig, wait for 1[s] between the removal of the old address and addition of the new address it immediately works, but people has to wait 1[s] for each address assignment... - in kernel, properly manages the reference count of nd_prefix and remove the nd_prefix only when the reference count becomes 0. There's a KAME code implementing this. I'm now porting it, but it'll take some time to check its behavior (a day or two)... Thanks, ---- SUZUKI, Shinsuke @ KAME Project