From: Shane Kerr Date: Tue, 22 Aug 2006 15:01:47 +0000 (+0000) Subject: Merged rt16356. X-Git-Tag: v4_0_0a1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a73b7b672c4a77f148095bbc6633f1f7cfb0ace;p=thirdparty%2Fdhcp.git Merged rt16356. --- diff --git a/RELNOTES b/RELNOTES index a43247488..586e0b6f6 100644 --- a/RELNOTES +++ b/RELNOTES @@ -143,6 +143,14 @@ the README file. - Encapsulated option spaces within encapsulated option spaces is now formally supported. + Changes since 3.0.5rc1 + +- A bug was repaired in fixes to the dhclient, which sought to run the + dhclient-script with the 'EXPIRE' state should it receive a NAK in + response to a REQUEST. The client now iterates the PREINIT state + after the EXPIRE state, so that interfaces that might be configured + 'down' can be brought back 'up' and initialized. + Changes since 3.0.4 - A warning that host statements declared within subnet or shared-network diff --git a/client/dhclient.c b/client/dhclient.c index db60ca5b5..2b7f02757 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -32,7 +32,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhclient.c,v 1.143 2006/08/09 14:57:47 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.144 2006/08/22 15:01:47 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1392,6 +1392,16 @@ void dhcpnak (packet) /* Stop sending DHCPREQUEST packets... */ cancel_timeout (send_request, client); + /* On some scripts, 'EXPIRE' causes the interface to be ifconfig'd + * down (this expunges any routes and arp cache). This makes the + * interface unusable by state_init(), which we call next. So, we + * need to 'PREINIT' the interface to bring it back up. + */ + script_init(client, "PREINIT", NULL); + if (client->alias) + script_write_params(client, "alias_", client->alias); + script_go(client); + client -> state = S_INIT; state_init (client); }