From owner-freebsd-stable@FreeBSD.ORG Fri Feb 9 21:36:08 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 0D7CD16A402 for ; Fri, 9 Feb 2007 21:36:08 +0000 (UTC) (envelope-from kevin@insidesystems.net) Received: from imap.insidesystems.net (imap.insidesystems.net [206.216.149.56]) by mx1.freebsd.org (Postfix) with ESMTP id E12D913C4A6 for ; Fri, 9 Feb 2007 21:36:07 +0000 (UTC) (envelope-from kevin@insidesystems.net) Received: from [68.32.227.193] (helo=[127.0.0.1]) by imap.insidesystems.net with esmtpa (Exim 4.60 (FreeBSD)) (envelope-from ) id 1HFcvT-0004s6-GR for freebsd-stable@freebsd.org; Fri, 09 Feb 2007 15:04:59 -0600 Message-ID: <45CCE270.7080704@insidesystems.net> Date: Fri, 09 Feb 2007 16:06:56 -0500 From: Kevin Way Organization: InsideSystems, Inc. User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: 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 21:36:08 -0000 I recently ran into a bug in the jail startup scripts that caused this command to be executed: ifconfig bce0 -alias It turns out that this command eliminated the primary IP for the device. man ifconfig defines the behavior of -alias to be: -alias Remove the network address specified. This would be used if you incorrectly specified an alias, or it was no longer needed. 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. I can't help but wonder if it would be better behavior to throw an error when no argument is supplied. 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. Should ifconfig throw an error if no address is supplied? -Kevin Way