From nobody@FreeBSD.org  Wed Jan  2 10:58:16 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A698F16A418
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  2 Jan 2008 10:58:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 97B9C13C44B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  2 Jan 2008 10:58:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m02AvQ5a037572
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 2 Jan 2008 10:57:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m02AvQ2j037571;
	Wed, 2 Jan 2008 10:57:26 GMT
	(envelope-from nobody)
Message-Id: <200801021057.m02AvQ2j037571@www.freebsd.org>
Date: Wed, 2 Jan 2008 10:57:26 GMT
From: Jaakko Heinonen <jh@saunalahti.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] dhclient removes aliases on PREINIT
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         119255
>Category:       bin
>Synopsis:       [patch] dhclient(8) removes aliases on PREINIT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 02 11:00:01 UTC 2008
>Closed-Date:    Wed Mar 12 17:30:55 UTC 2008
>Last-Modified:  Wed Mar 12 17:40:05 UTC 2008
>Originator:     Jaakko Heinonen
>Release:        7.0-RC1
>Organization:
>Environment:
FreeBSD x 7.0-RC1 FreeBSD 7.0-RC1 #0: Mon Dec 24 12:18:24 UTC 2007 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
dhclient-script removes aliases from the network interface when it does the PREINIT operation. For example if dhclient does EXPIRE -> PREINIT -> ARPSEND -> ARPCHECK -> BOUND cycle the aliases are lost. The bug is also described in this message:  http://lists.freebsd.org/pipermail/freebsd-isp/2007-August/004769.html .

>How-To-Repeat:
1) Configure at least one alias for a DHCP enabled interface

/etc/rc.conf:
ifconfig_rl0="DHCP"
ifconfig_rl0_alias0="inet 10.0.0.103 netmask 255.255.255.0"

2) Wait dhclient to do EXPIRE -> PREINIT -> ARPSEND -> ARPCHECK -> BOUND cycle

3) Aliases are lost from the interface (10.0.0.103 in this example).
>Fix:


Patch attached with submission follows:

--- /sbin/dhclient-script.orig	2007-12-27 22:17:06.000000000 +0200
+++ /sbin/dhclient-script	2007-12-28 01:27:28.000000000 +0200
@@ -284,7 +284,7 @@
 
 PREINIT)
 	delete_old_alias
-	$IFCONFIG $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up
+	$IFCONFIG $interface inet alias 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up
 	;;
 
 ARPCHECK|ARPSEND)


>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/119255: commit references a PR
Date: Mon, 21 Jan 2008 23:55:09 +0000 (UTC)

 brooks      2008-01-21 23:54:57 UTC
 
   FreeBSD src repository
 
   Modified files:
     sbin/dhclient        dhclient-script 
   Log:
   During PREINIT, when giving the interface the address 0.0.0.0, do it as an
   alias to avoid distrubing other addresses.
   
   PR:             bin/119255
   Submitted by:   Jaakko Heinonen <jh at saunalahti dot fi>
   
   Revision  Changes    Path
   1.18      +1 -1      src/sbin/dhclient/dhclient-script
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Thu Feb 28 12:06:33 UTC 2008 
State-Changed-Why:  
Patched in -HEAD, needs MFC to RELENG_7 and RELENG_6 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119255 
State-Changed-From-To: patched->closed 
State-Changed-By: brooks 
State-Changed-When: Wed Mar 12 17:29:58 UTC 2008 
State-Changed-Why:  
Merged to RELENG_6 and RELENG_7. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119255 
Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Wed Mar 12 17:30:57 UTC 2008 
Responsible-Changed-Why:  
Merged to RELENG_6 and RELENG_7. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/119255: commit references a PR
Date: Wed, 12 Mar 2008 17:28:55 +0000 (UTC)

 brooks      2008-03-12 17:28:47 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sbin/dhclient        dhclient-script 
   Log:
   MFC rev 1.18:
   
   During PREINIT, when giving the interface the address 0.0.0.0, do it as an
   alias to avoid distrubing other addresses.
   
   PR:             bin/119255
   Submitted by:   Jaakko Heinonen <jh at saunalahti dot fi>
   
   Revision  Changes    Path
   1.17.2.1  +1 -1      src/sbin/dhclient/dhclient-script
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/119255: commit references a PR
Date: Wed, 12 Mar 2008 17:29:52 +0000 (UTC)

 brooks      2008-03-12 17:29:42 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sbin/dhclient        dhclient-script 
   Log:
   MFC rev 1.18:
   
   During PREINIT, when giving the interface the address 0.0.0.0, do it as an
   alias to avoid distrubing other addresses.
   
   PR:             bin/119255
   Submitted by:   Jaakko Heinonen <jh at saunalahti dot fi>
   
   Revision  Changes    Path
   1.4.2.7   +1 -1      src/sbin/dhclient/dhclient-script
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
