]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- If the dhclient were to receive a DHCPNAK while it was in the RENEW
authorDavid Hankins <dhankins@isc.org>
Sun, 9 Jul 2006 15:39:48 +0000 (15:39 +0000)
committerDavid Hankins <dhankins@isc.org>
Sun, 9 Jul 2006 15:39:48 +0000 (15:39 +0000)
  state (and consequently, had an active, 'bound' address and related
  configuration options), it would fail to 'tear down' this information
  before proceeding into INIT state.  dhclient now iterates the dhclient-
  script with the 'EXPIRE' action to cause these teardowns prior to entering
  INIT state. [ISC-Bugs #16035]

RELNOTES
client/dhclient.c

index 13d813c3a409c0ac146debeed2d110e697cdbdd8..a2e4d8e900d258df496948ad9a055cdfaccadeb4 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -144,6 +144,13 @@ and for prodding me into improving it.
   configuration option - the default configuration and results should be
   more clear now.
 
+- If the dhclient were to receive a DHCPNAK while it was in the RENEW
+  state (and consequently, had an active, 'bound' address and related
+  configuration options), it would fail to 'tear down' this information
+  before proceeding into INIT state.  dhclient now iterates the dhclient-
+  script with the 'EXPIRE' action to cause these teardowns prior to entering
+  INIT state.
+
                        Changes since 3.0.4rc1
 
 - The dhcp-options.5 manpage was updated to correct indentation errors
index 094df7f1d37481c65d0d5a0d954ff546683f9a82..fff2f3e1a9c13072cdc145ad17ca20f4a7a55020 100644 (file)
@@ -32,7 +32,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.140 2006/06/06 16:35:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.141 2006/07/09 15:39:48 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1377,6 +1377,17 @@ void dhcpnak (packet)
                return;
        }
 
+       /* If we get a DHCPNAK, we use the EXPIRE dhclient-script state
+        * to indicate that we want all old bindings to be removed.  (It
+        * is possible that we may get a NAK while in the RENEW state,
+        * so we might have bindings active at that time)
+        */
+       script_init(client, "EXPIRE", NULL);
+       script_write_params(client, "old_", client->active);
+       if (client->alias)
+               script_write_params(client, "alias_", client->alias);
+       script_go(client);
+
        destroy_client_lease (client -> active);
        client -> active = (struct client_lease *)0;