summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELNOTES7
-rw-r--r--client/dhclient.c13
2 files changed, 19 insertions, 1 deletions
diff --git a/RELNOTES b/RELNOTES
index 13d813c3..a2e4d8e9 100644
--- 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
diff --git a/client/dhclient.c b/client/dhclient.c
index 094df7f1..fff2f3e1 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -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;