From eugen@www.svzserv.kemerovo.su  Sat May 25 00:10:26 2002
Return-Path: <eugen@www.svzserv.kemerovo.su>
Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80])
	by hub.freebsd.org (Postfix) with ESMTP id 8553137B40C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 May 2002 00:10:25 -0700 (PDT)
Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1])
	by www.svzserv.kemerovo.su (8.12.3/8.12.3) with ESMTP id g4P7AMb2062065
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 May 2002 15:10:22 +0800 (KRAST)
	(envelope-from eugen@www.svzserv.kemerovo.su)
Received: (from eugen@localhost)
	by www.svzserv.kemerovo.su (8.12.3/8.12.3/Submit) id g4P7AIuN061976;
	Sat, 25 May 2002 15:10:18 +0800 (KRAST)
Message-Id: <200205250710.g4P7AIuN061976@www.svzserv.kemerovo.su>
Date: Sat, 25 May 2002 15:10:18 +0800 (KRAST)
From: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
Reply-To: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: 'ifconfig ifname down delete' does not deletes aliases
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38533
>Category:       bin
>Synopsis:       'ifconfig ifname down delete' does not deletes aliases
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 25 00:20:01 PDT 2002
>Closed-Date:    Sat May 25 09:42:18 PDT 2002
>Last-Modified:  Sat May 25 09:50:01 PDT 2002
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.6-PRERELEASE i386
>Organization:
Svyaz Service
>Environment:
System: FreeBSD 4.6-PRERELEASE #1: Tue May 7 14:13:36 KRAST 2002

>Description:
	I have an interface with primary and aliased addresses
	and try to clear them all and take interface down.
	So I type
	
		ifconfig fxp0 down delete

	And I see that primary address (with correct netmask) is removed
	but alias (with netmask 255.255.255.255) is still here.

>How-To-Repeat:

	See above.

>Fix:

	Unknown for me.
>Release-Note:
>Audit-Trail:

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sat, 25 May 2002 13:58:32 +0300

 --p4qYPpj5QlsIQJ0K
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, May 25, 2002 at 03:10:18PM +0800, Eugene Grosbein wrote:
 >=20
 > I have an interface with primary and aliased addresses
 > and try to clear them all and take interface down.
 > So I type
 >=20
 > 	ifconfig fxp0 down delete
 >=20
 > And I see that primary address (with correct netmask) is removed
 > but alias (with netmask 255.255.255.255) is still here.
 >=20
 It would be very sad if it did.
 
 `delete' is just another alias for `-alias'.  It deletes the address
 specified, or the first address (in this family) if no address was
 specified, of the interface.
 
 This PR can be closed.
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --p4qYPpj5QlsIQJ0K
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 
 iD8DBQE8725YUkv4P6juNwoRAhZUAJsGq2Bw0rDhhhz3yhf6FWbvZavjyQCff95j
 QiD7dMTgUgV4hTcSv33Pc3Q=
 =Myx1
 -----END PGP SIGNATURE-----
 
 --p4qYPpj5QlsIQJ0K--

From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>,
	bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sat, 25 May 2002 23:28:09 +0800

 Ruslan Ermilov wrote:
 > 
 > On Sat, May 25, 2002 at 03:10:18PM +0800, Eugene Grosbein wrote:
 > >
 > > I have an interface with primary and aliased addresses
 > > and try to clear them all and take interface down.
 > > So I type
 > >
 > >       ifconfig fxp0 down delete
 > >
 > > And I see that primary address (with correct netmask) is removed
 > > but alias (with netmask 255.255.255.255) is still here.
 > >
 > It would be very sad if it did.
 > 
 > `delete' is just another alias for `-alias'.  It deletes the address
 > specified, or the first address (in this family) if no address was
 > specified, of the interface.
 > 
 > This PR can be closed.
 
 Then it should preserve original netmask, I guess.
 
 Well, if 'ifconfig down delete' doesn't deletes all interfaces' IP,
 if there an easy way to perform this task?
 If not, I think this command is good candidate.
 
 Eugene Grosbein

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Eugene Grosbein <eugen@grosbein.pp.ru>
Cc: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>,
	bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sat, 25 May 2002 18:40:56 +0300

 On Sat, May 25, 2002 at 11:28:09PM +0800, Eugene Grosbein wrote:
 > Ruslan Ermilov wrote:
 > > 
 > > On Sat, May 25, 2002 at 03:10:18PM +0800, Eugene Grosbein wrote:
 > > >
 > > > I have an interface with primary and aliased addresses
 > > > and try to clear them all and take interface down.
 > > > So I type
 > > >
 > > >       ifconfig fxp0 down delete
 > > >
 > > > And I see that primary address (with correct netmask) is removed
 > > > but alias (with netmask 255.255.255.255) is still here.
 > > >
 > > It would be very sad if it did.
 > > 
 > > `delete' is just another alias for `-alias'.  It deletes the address
 > > specified, or the first address (in this family) if no address was
 > > specified, of the interface.
 > > 
 > > This PR can be closed.
 > 
 > Then it should preserve original netmask, I guess.
 > 
 Umm, preserve the original netmask of _what_?
 
 > Well, if 'ifconfig down delete' doesn't deletes all interfaces' IP,
 > if there an easy way to perform this task?
 > If not, I think this command is good candidate.
 > 
 ifconfig rl0 inet | tail +2 | xargs -n1 ifconfig rl0 delete
 
 
 Cheers,
 -- 
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age

From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sat, 25 May 2002 23:50:18 +0800

 Ruslan Ermilov wrote:
 
 > > > > I have an interface with primary and aliased addresses
 > > > > and try to clear them all and take interface down.
 > > > > So I type
 > > > >
 > > > >       ifconfig fxp0 down delete
 > > > >
 > > > > And I see that primary address (with correct netmask) is removed
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 > > > > but alias (with netmask 255.255.255.255) is still here.
 > > > >
 > > > It would be very sad if it did.
 > > >
 > > > `delete' is just another alias for `-alias'.  It deletes the address
 > > > specified, or the first address (in this family) if no address was
 > > > specified, of the interface.
 > > >
 > > > This PR can be closed.
 > >
 > > Then it should preserve original netmask, I guess.
 > >
 > Umm, preserve the original netmask of _what_?
 
 Of primary IP being removed.
 
 > > Well, if 'ifconfig down delete' doesn't deletes all interfaces' IP,
 > > if there an easy way to perform this task?
 > > If not, I think this command is good candidate.
 > >
 > ifconfig rl0 inet | tail +2 | xargs -n1 ifconfig rl0 delete
 
 Thanks. I'd like to have some more intuitive for non-script work :-)
 
 Eugene

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Eugene Grosbein <eugen@grosbein.pp.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sat, 25 May 2002 19:04:05 +0300

 --NDin8bjvE/0mNLFQ
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, May 25, 2002 at 11:50:18PM +0800, Eugene Grosbein wrote:
 > Ruslan Ermilov wrote:
 >=20
 > > > > > I have an interface with primary and aliased addresses
 > > > > > and try to clear them all and take interface down.
 > > > > > So I type
 > > > > >
 > > > > >       ifconfig fxp0 down delete
 > > > > >
 > > > > > And I see that primary address (with correct netmask) is removed
 >                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 > > > > > but alias (with netmask 255.255.255.255) is still here.
 > > > > >
 > > > > It would be very sad if it did.
 > > > >
 > > > > `delete' is just another alias for `-alias'.  It deletes the address
 > > > > specified, or the first address (in this family) if no address was
 > > > > specified, of the interface.
 > > > >
 > > > > This PR can be closed.
 > > >
 > > > Then it should preserve original netmask, I guess.
 > > >
 > > Umm, preserve the original netmask of _what_?
 >=20
 > Of primary IP being removed.
 >=20
 I don't quite follow, sorry.  Suppose you have two IP addresses
 from different networks bound to an interface.  If you delete
 one address, it just gets deleted.  Nothing else should be
 done.
 
 > > > Well, if 'ifconfig down delete' doesn't deletes all interfaces' IP,
 > > > if there an easy way to perform this task?
 > > > If not, I think this command is good candidate.
 > > >
 > > ifconfig rl0 inet | tail +2 | xargs -n1 ifconfig rl0 delete
 >=20
 > Thanks. I'd like to have some more intuitive for non-script work :-)
 >=20
 There is no ioctl(2) to delete all addresses.
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --NDin8bjvE/0mNLFQ
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 
 iD8DBQE877X1Ukv4P6juNwoRAooHAJ9HlGdDej0wP3UhECs9VvuVicoIvQCfVU+V
 QLDkxtL7Mi0evJO/D2DVlAo=
 =dhUn
 -----END PGP SIGNATURE-----
 
 --NDin8bjvE/0mNLFQ--

From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: Ruslan Ermilov <ru@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sun, 26 May 2002 00:12:11 +0800

 Ruslan Ermilov wrote:
 
 > I don't quite follow, sorry.  Suppose you have two IP addresses
 > from different networks bound to an interface.  If you delete
 > one address, it just gets deleted.  Nothing else should be
 > done.
 
 Right. But suppose you have two IP addresses from the same network
 (second with netmask 255.255.255.255). 
 If you remove primary one (with correct netmask), you end up
 with last IP address and netmask 255.255.255.255 that's seem to be wrong.
 I guess right netmask should be preserved.
 
 Eugene
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Sat May 25 09:41:59 PDT 2002 
State-Changed-Why:  
It shouldn't. 

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

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Eugene Grosbein <eugen@grosbein.pp.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/38533: 'ifconfig ifname down delete' does not deletes aliases
Date: Sat, 25 May 2002 19:41:29 +0300

 --llIrKcgUOe3dCx0c
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Sun, May 26, 2002 at 12:12:11AM +0800, Eugene Grosbein wrote:
 > Ruslan Ermilov wrote:
 >=20
 > > I don't quite follow, sorry.  Suppose you have two IP addresses
 > > from different networks bound to an interface.  If you delete
 > > one address, it just gets deleted.  Nothing else should be
 > > done.
 >=20
 > Right. But suppose you have two IP addresses from the same network
 > (second with netmask 255.255.255.255).=20
 > If you remove primary one (with correct netmask), you end up
 > with last IP address and netmask 255.255.255.255 that's seem to be wrong.
 > I guess right netmask should be preserved.
 >=20
 If you have x.y.z.1/24 and x.y.z.2/32,
 
 	ifconfig if0 x.y.z.2/32 delete
 	ifconfig if0 x.y.z.2
 
 will do it for you.  Anyway, we're diverging from the PR's topic.
 "delete" works as expected, it just deletes the primary address
 of an interface (if no specific address is supplied).
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --llIrKcgUOe3dCx0c
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 
 iD8DBQE87765Ukv4P6juNwoRAlgTAJ47Coc7VYkDFzM14tXMcyxLp6WNHwCeKhru
 V14i1YNzwykESmwzs0u1BcA=
 =Oml9
 -----END PGP SIGNATURE-----
 
 --llIrKcgUOe3dCx0c--
>Unformatted:
