From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 19:28:34 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 052B416A41A; Thu, 30 Aug 2007 19:28:34 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id C036D13C46A; Thu, 30 Aug 2007 19:28:33 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from [192.168.1.211] (baba.farley.org [192.168.1.211] (may be forged)) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l7UJS8T1050310; Thu, 30 Aug 2007 14:28:08 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Thu, 30 Aug 2007 14:28:07 -0500 (CDT) From: "Sean C. Farley" To: freebsd-current@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=us-ascii X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: Wes Peters Subject: Multiple aliases with dhclient X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2007 19:28:34 -0000 Here is a simple patch[1] that protects existing IP's on an interface from being erased by the dhclient during the PREINIT stage. dhclient-script (the real culprit) replaces the first IP on an interface with this line: ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up My solution is to have this be declared an alias, so existing IP's will stay even after the script replaces this entry with the obtained IP. This is needed, at least by me, to have multiple aliases on an interface that's primary IP is obtained by DHCP. Also, dhclient only supports having one alias on an interface via dhclient.conf. I heard no complaints from net@ [2] and one "sounds correct" from brooks@ (thank you), but I still wonder if there is something I am not considering that would cause problems for other people. Sean 1. http://www.farley.org/freebsd/tmp/dhclient-script.patch 2. http://lists.freebsd.org/pipermail/freebsd-net/2007-August/015155.html -- scf@FreeBSD.org