From owner-freebsd-stable@FreeBSD.ORG Fri Feb 9 22:55:05 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACDF716A403 for ; Fri, 9 Feb 2007 22:55:05 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by mx1.freebsd.org (Postfix) with ESMTP id 2E45713C467 for ; Fri, 9 Feb 2007 22:55:05 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id l19MTPE4012570; Fri, 9 Feb 2007 16:29:25 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id l19MTPx9012569; Fri, 9 Feb 2007 16:29:25 -0600 (CST) (envelope-from brooks) Date: Fri, 9 Feb 2007 16:29:25 -0600 From: Brooks Davis To: Kevin Way , freebsd-stable@freebsd.org Message-ID: <20070209222925.GB11826@lor.one-eyed-alien.net> References: <45CCE270.7080704@insidesystems.net> <20070209214908.GA64090@icarus.home.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qcHopEYAB45HaUaB" Content-Disposition: inline In-Reply-To: <20070209214908.GA64090@icarus.home.lan> User-Agent: Mutt/1.5.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 09 Feb 2007 16:29:26 -0600 (CST) Cc: Subject: Re: Desired behaviour of "ifconfig -alias" 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: Fri, 09 Feb 2007 22:55:05 -0000 --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 09, 2007 at 01:49:08PM -0800, Jeremy Chadwick wrote: > On Fri, Feb 09, 2007 at 04:06:56PM -0500, Kevin Way wrote: > > I recently ran into a bug in the jail startup scripts that caused this > > command to be executed: > >=20 > > ifconfig bce0 -alias > >=20 > > It turns out that this command eliminated the primary IP for the device. > >=20 > > man ifconfig defines the behavior of -alias to be: > >=20 > > -alias Remove the network address specified. This would be used > > if you > > incorrectly specified an alias, or it was no longer needed= =2E If > > you have incorrectly set an NS address having the side > > effect of > > specifying the host portion, removing all NS addresses will > > allow > > you to respecify the host portion. > >=20 > >=20 > > I can't help but wonder if it would be better behavior to throw an error > > when no > > argument is supplied. > >=20 > > The only discussion I found of this in a quick search of the archives > > was a post in > > 2004 which noted that the fxp driver actually deletes all IP addresses, > > but there was > > no significant follow-up. > >=20 > > Should ifconfig throw an error if no address is supplied? >=20 > My vote is for either 1) an error, or 2) delete all of the aliases > associated with that interface. If I had a preference, I'd choose #1. >=20 > I'd argue that -alias doing what you described (removing the non-aliased > IP bound to the iface) when no inet/inet6 arguments are suppied is > indeed a bug. It's way to late to make this change. This is known behavior and has been for ages. If there's a bug it's in the documentation. -- Brooks --qcHopEYAB45HaUaB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFzPXEXY6L6fI4GtQRAkkSAKCpoWo/7D2EAjsiBowRgL7qTzk/mgCgj/43 zzn/eglfGIxnf3xjrUJpyMk= =JG0P -----END PGP SIGNATURE----- --qcHopEYAB45HaUaB--