From nobody@www.freebsd.org  Tue May 28 16:37:37 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id D8A7237B406
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 May 2002 16:37:34 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4SNbYhG034329
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 May 2002 16:37:34 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g4SNbYgA034328;
	Tue, 28 May 2002 16:37:34 -0700 (PDT)
Message-Id: <200205282337.g4SNbYgA034328@www.freebsd.org>
Date: Tue, 28 May 2002 16:37:34 -0700 (PDT)
From: Sergey Veltistov <phisto@mail.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ifconfig+alias
X-Send-Pr-Version: www-1.0

>Number:         38672
>Category:       misc
>Synopsis:       ifconfig+alias
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 28 16:40:01 PDT 2002
>Closed-Date:    Mon May 05 13:17:13 PDT 2003
>Last-Modified:  Mon May 05 13:17:13 PDT 2003
>Originator:     Sergey Veltistov
>Release:        4.6-RC FreeBSD
>Organization:
RSUog
>Environment:
FreeBSD 4.6-RC FreeBSD 4.6-RC #6: Sun May 19 18:56:42 MSD 2002
>Description:
Then i try bind alias on iface.
xxx.xxx.x.20 does not using any other before.
after last attempt, xxx.xxx.x.20 working fine.

ps sorry for my eng.
>How-To-Repeat:
nevermind# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet xxx.xxx.x.10 netmask 0xffffffc0 broadcast xxx.xxx.x.63
        ether 00:20:ed:29:33:33
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
nevermind#
nevermind# ifconfig fxp0 inet xxx.xxx.x.20 netmask 255.255.255.192 alias
ifconfig: ioctl (SIOCAIFADDR): File exists
nevermind#
nevermind# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet xxx.xxx.x.10 netmask 0xffffffc0 broadcast xxx.xxx.x.63
        ether 00:20:ed:29:33:33
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
nevermind#
nevermind# ifconfig fxp0 inet xxx.xxx.x.20 netmask 255.255.255.0 alias
nevermind#
nevermind# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet xxx.xxx.x.10 netmask 0xffffffc0 broadcast xxx.xxx.x.63
        inet xxx.xxx.x.20 netmask 0xffffff00 broadcast xxx.xxx.x.255
        ether 00:20:ed:29:33:33
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
nevermind#
nevermind# ifconfig fxp0 inet xxx.xxx.x.20 netmask 255.255.255.192 alias
ifconfig: ioctl (SIOCAIFADDR): File exists
nevermind#
nevermind# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet xxx.xxx.x.10 netmask 0xffffffc0 broadcast xxx.xxx.x.63
        inet xxx.xxx.x.20 netmask 0xffffffc0 broadcast xxx.xxx.x.63
        ether 00:20:ed:29:33:33
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
nevermind#
>Fix:
     N/A
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Mon Jun 3 05:08:45 PDT 2002 
State-Changed-Why:  
This behaviour is correct.  You must specify non conflicting netmasks 
for interface aliases.  Usually this means using a netmask of 0xffffffff. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38672 
State-Changed-From-To: closed->open 
State-Changed-By: cjc 
State-Changed-When: Sat Jun 8 18:04:59 PDT 2002 
State-Changed-Why:  
No, there is a bug here. Look again at the last configuration (my '^'s 
added), 

nevermind# ifconfig fxp0 
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 
inet xxx.xxx.x.10 netmask 0xffffffc0 broadcast xxx.xxx.x.63 
inet xxx.xxx.x.20 netmask 0xffffff00 broadcast xxx.xxx.x.255 
^^ 
ether 00:20:ed:29:33:33 
media: Ethernet autoselect (100baseTX <full-duplex>) 
status: active 
nevermind# ifconfig fxp0 inet xxx.xxx.x.20 netmask 255.255.255.192 
alias 
ifconfig: ioctl (SIOCAIFADDR): File exists 
nevermind# ifconfig fxp0 
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 
inet xxx.xxx.x.10 netmask 0xffffffc0 broadcast xxx.xxx.x.63 
inet xxx.xxx.x.20 netmask 0xffffffc0 broadcast xxx.xxx.x.63 
^^ 
ether 00:20:ed:29:33:33 
media: Ethernet autoselect (100baseTX <full-duplex>) 
status: active 

The bug here is that the netmask and broadcast _are_ changed despite 
the fact that an invalid alias is being added. When ifconfig(8) errors 
out like that, it shouldn't be leaving a broken entry. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=38672 

From: Russell Cattelan <cattelan@thebarn.com>
To: freebsd-gnats-submit@FreeBSD.org, phisto@mail.ru
Cc:  
Subject: Re: misc/38672: ifconfig+alias
Date: 01 Jul 2002 20:56:24 -0500

 I just hit this bug also... does anybody have a fix for it yet?
 It seems to have showwn up someplace between 4.5 and 4.6
 
 It appears something is being over checking if I create aliases
 with different netmasks it works, but creating aliases 
 with the same netmask as an already existing ip fails.
 
 -- 
 Russell Cattelan
 cattelan@thebarn.com
 
State-Changed-From-To: open->feedback 
State-Changed-By: dougb 
State-Changed-When: Sun Apr 20 15:27:32 PDT 2003 
State-Changed-Why:  

Is this still a problem in 4.8? I'm pretty sure this is 
actually user error, but just in case.... 


Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Sun Apr 20 15:27:32 PDT 2003 
Responsible-Changed-Why:  

I'll handle the feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38672 
State-Changed-From-To: feedback->closed 
State-Changed-By: dougb 
State-Changed-When: Mon May 5 13:17:02 PDT 2003 
State-Changed-Why:  

Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38672 
>Unformatted:
