diff options
author | David Hankins <dhankins@isc.org> | 2006-07-09 15:40:12 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2006-07-09 15:40:12 +0000 |
commit | 24bda269e447127ee92a8a766bea85af6d4cce74 (patch) | |
tree | fecf51fa96de4b3cb3170fe2270079f7d2751db0 | |
parent | 03d3a26b72afa870766f8d95656e67cc542d39cc (diff) | |
download | isc-dhcp-24bda269e447127ee92a8a766bea85af6d4cce74.tar.gz |
- 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. [ISC-Bugs #16035]
-rw-r--r-- | RELNOTES | 7 | ||||
-rw-r--r-- | client/dhclient.c | 13 |
2 files changed, 19 insertions, 1 deletions
@@ -106,6 +106,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 diff --git a/client/dhclient.c b/client/dhclient.c index db4afab4..7f9cb439 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -32,7 +32,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhclient.c,v 1.129.2.32 2006/04/27 21:38:29 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.129.2.33 2006/07/09 15:40:12 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1334,6 +1334,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; |