NetBSD Problem Report #10427
Received: (qmail 1820 invoked from network); 23 Jun 2000 13:48:14 -0000
Message-Id: <200006231348.NAA16436@orchard.arlington.ma.us>
Date: Fri, 23 Jun 2000 13:48:13 GMT
From: sommerfeld@orchard.arlington.ma.us (Bill Sommerfeld)
Reply-To: sommerfeld@orchard.arlington.ma.us
To: gnats-bugs@gnats.netbsd.org
Subject: adding inet6 aliases reports "file exists" but succeeds
X-Send-Pr-Version: 3.95
>Number: 10427
>Category: kern
>Synopsis: adding inet6 aliases reports "file exists" but succeeds
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: itojun
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 23 13:49:00 +0000 2000
>Closed-Date: Sun Jul 22 16:15:03 +0000 2001
>Last-Modified: Sun Jul 22 16:15:03 +0000 2001
>Originator: Bill Sommerfeld
>Release: 20000615 or thereabouts
>Organization:
>Environment:
System: NetBSD thunk 1.4ZD NetBSD 1.4ZD (VAIO) #96: Fri Jun 16 10:40:53 EDT
2000 root@thunk:/usr/wes/sys-current/arch/i386/compile/VAIO i386
>Description:
ifconfig spuriously reports "ifconfig: SIOCAIFADDR: File exists" when
adding an additional address on a subnet when we already have the
address present.
>How-To-Repeat:
# ifconfig fxp0 inet6 3ffe:1ce1:0:fe01::10
# ifconfig fxp0 inet6 3ffe:1ce1:0:fe01::11
ifconfig: SIOCAIFADDR: File exists
note that the added addresses turn up in ifconfig anyway.
>Fix:
I didn't analyze this completely. my guess is that it's reporting
EEXIST when adding the subnet route for the ifaddr's directly
connected subnet. A bunch of this code badly needs a cleanup.
>Release-Note:
>Audit-Trail:
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
To: sommerfeld@orchard.arlington.ma.us
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/10427: adding inet6 aliases reports "file exists" but succeeds
Date: Sat, 24 Jun 2000 00:08:54 +0900
>>Synopsis: adding inet6 aliases reports "file exists" but succeeds
>>Description:
>ifconfig spuriously reports "ifconfig: SIOCAIFADDR: File exists" when
>adding an additional address on a subnet when we already have the
>address present.
>>How-To-Repeat:
> # ifconfig fxp0 inet6 3ffe:1ce1:0:fe01::10
> # ifconfig fxp0 inet6 3ffe:1ce1:0:fe01::11
> ifconfig: SIOCAIFADDR: File exists
>note that the added addresses turn up in ifconfig anyway.
>>Fix:
>I didn't analyze this completely. my guess is that it's reporting
>EEXIST when adding the subnet route for the ifaddr's directly
>connected subnet. A bunch of this code badly needs a cleanup.
The error value is from in6_ifinit(). in6_ifaddr() fails in multiple
cases, and there is no good way for caller to diagnose which error code
is critical and which is not. i think we should fix this by hiding
EEXIST from in6_ifaddr() (actually from rtinit()), because the error is
non-critical. if we already have the route and the route is toward
the same interface, we
with 1.4.2 in_control() and in_ifinit() code,
- we ignored error from in6_ifaddr() completely, assuming that
ifp->if_ioctl will always success. which is bad.
- there was memory leak (or insufficient failure recovery) due to
hashed lookup table initialization code.
the current codepath (for both IPv4 and IPv6) has some #if 0 portion,
which tried to correct the behavior.
i will look at the portion soon.
itojun
Responsible-Changed-From-To: kern-bug-people->itojun
Responsible-Changed-By: itojun
Responsible-Changed-When: Fri Jun 23 08:11:51 PDT 2000
Responsible-Changed-Why:
mine
From: "Kevin P. Neal" <kpneal@pobox.com>
To: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/10427: adding inet6 aliases reports "file exists" but succeeds
Date: Fri, 23 Jun 2000 11:39:40 -0400
On Fri, Jun 23, 2000 at 01:48:13PM +0000, Bill Sommerfeld wrote:
>
> >Number: 10427
> >Category: kern
> >Synopsis: adding inet6 aliases reports "file exists" but succeeds
> >Environment:
>
> System: NetBSD thunk 1.4ZD NetBSD 1.4ZD (VAIO) #96: Fri Jun 16 10:40:53 EDT
> 2000 root@thunk:/usr/wes/sys-current/arch/i386/compile/VAIO i386
>
> >Description:
>
> ifconfig spuriously reports "ifconfig: SIOCAIFADDR: File exists" when
> adding an additional address on a subnet when we already have the
> address present.
I'm seeing this with IPv4 aliases as well, on a 1.4.{1,2} Alpha box.
It doesn't always happen, so I guess there is a race somewhere.
Come to think of it, I think alias removal is wonky also. I saw
deletion of an alias on an interface resulting in the wrong alias
being deleted (if using multiple aliases of course).
--
Kevin P. Neal http://www.pobox.com/~kpn/
"Nonbelievers found it difficult to defend their position in \
the presense of a working computer." -- a DEC Jensen paper
State-Changed-From-To: open->feedback
State-Changed-By: itojun
State-Changed-When: Tue Sep 5 08:15:54 PDT 2000
State-Changed-Why:
workaround is in -current and 1.5. in the future i'll put more fundamental
improvement (which is under testing in kame tree)
State-Changed-From-To: feedback->closed
State-Changed-By: itojun
State-Changed-When: Sun Jul 22 09:14:32 PDT 2001
State-Changed-Why:
proper solution is in tree (in_add/scrubprefix)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.