From owner-freebsd-stable@FreeBSD.ORG Tue Feb 13 07:57:33 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 86D3816A401 for ; Tue, 13 Feb 2007 07:57:33 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id E7AD613C47E for ; Tue, 13 Feb 2007 07:57:32 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (nmbcnc@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l1D7vPbW025672; Tue, 13 Feb 2007 08:57:31 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l1D7vPnP025671; Tue, 13 Feb 2007 08:57:25 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <200702130757.l1D7vPnP025671@lurza.secnetix.de> To: kevin@insidesystems.net (Kevin Way) Date: Tue, 13 Feb 2007 08:57:25 +0100 (CET) In-Reply-To: <45D0F785.1040805@insidesystems.net> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 13 Feb 2007 08:57:31 +0100 (CET) Cc: freebsd-stable@FreeBSD.ORG 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: Tue, 13 Feb 2007 07:57:33 -0000 Kevin Way wrote: > Oliver Fromme wrote: > > But you called it "confusing". That's just your personal > > perception. It doesn't mean it is confusing to everybody. > > > If asked what -alias does, would you really reply "it removes the > primary IP, > while leaving the alias?" Be honest here. No, I wouldn't answer that, because there is no such thing as a primary IP. All IPs on an interface are equal. The term alias exists only for historical reasons, and it's clearly becoming obsolete. If asked what "-alias" does, I would reply that it is an alias for "delete" or "remove", which removes an IP address from an interface. According to the docs, the IP address to be removed must be specified. The docs don't mention what happens if none is specified, so the behaviour is undefined and should not be relied on. It just happens that the behaviour is to remove an arbitrary IP address (which happens to be the first one). That behaviour should be documented in the manual page. > > Also note that it doesn't hurt anybody. > > If you run RELENG_6_2, and a jail fails to start, this command is called. > And instead of unaliasing the jail's alias, it (because of a bug in the > shipped > rc.d scripts), it removes the primary IP. That's clearly a bug in the scripts then. They shouldn't call a command that can cause undefined behaviour. I'm not against changing the behaviour for the -alias parameter, if it's done carefully and in -current first, as I wrote earlier. However, the behaviour for "delete" and "remove" should stay as-is (and be documented in the man page) because it makes sense. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart Any opinions expressed in this message are personal to the author and may not necessarily reflect the opinions of secnetix GmbH & Co KG in any way. FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon