From nobody@FreeBSD.org  Thu Jun 13 18:38:14 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id F23E173C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Jun 2013 18:38:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id E2E8F1D43
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Jun 2013 18:38:14 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5DIcElt020524
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 13 Jun 2013 18:38:14 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5DIcEg8020523;
	Thu, 13 Jun 2013 18:38:14 GMT
	(envelope-from nobody)
Message-Id: <201306131838.r5DIcEg8020523@oldred.freebsd.org>
Date: Thu, 13 Jun 2013 18:38:14 GMT
From: Allen <allen@edataquest.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dhclient does not apply changes to lease if IP unchanged
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179540
>Category:       bin
>Synopsis:       dhclient-script(8): dhclient does not apply changes to lease if IP unchanged
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 13 18:40:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun Jun 16 23:43:56 UTC 2013
>Originator:     Allen
>Release:        8.2
>Organization:
>Environment:
FreeBSD mail.localdomain 8.2-STABLE FreeBSD 8.2-STABLE #0: Fri Oct 14 00:11:10 UTC 2011     root@freebsd-82-64.master.concord.internal:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Upon lease renewal, if the IP address of the lease has not changed, other lease options that have changed are apparently ignored.  Only tested with a changing subnet mask but suspect other fields behave similarly.

A pfSense DHCP server serving multiple clients exhibited this behavior when the IP address of the pfSense LAN (and thus the DHCP pool) was changed from 192.168.28.1/22 to 192.168.28.1/20.

The new netmask (0xfffff000 / 255.255.240.0) is present in the client lease file, but ifconfig shows the old netmask (0xfffffc00 / 255.255.252.0) is still configured on the interface.

>How-To-Repeat:
1. Create a subnet with dhcp, e.g. 10.0.0.0/24 with 10.0.0.(200-250) as the dhcp pool.

2. Acquire a lease from this pool on a FreeBSD DHCP client.

3. Change the netmask of the DHCP server and pool to something wider, e.g. 10.0.0.0/22.

4. Await DHCP renewal on client.  The lease file will reflect the new subnet mask, but the new mask is not applied to the interface.
>Fix:


>Release-Note:
>Audit-Trail:

From: Allen Landsidel <allen@edataquest.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/179540: dhclient does not apply changes to lease if IP unchanged
Date: Thu, 13 Jun 2013 14:58:18 -0400

 This appears to be a simple bug in dhclient-script, similar to one in 
 Linux from a few years back.
 
 The "BOUND|RENEW|REBIND|REBOOT" block only resets the interface address, 
 netmask, and routes if the IP address has changed.  Should be easy to fix.
>Unformatted:
