added nak script support

This commit is contained in:
Russ Dill
2002-05-23 19:29:25 +00:00
parent 393499ec8f
commit 4fe980fa17
3 changed files with 10 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
0.9.7 (pending)
+ Added script hook for DHCPNAK (nak), as well as providing the message option
(me)
+ Generate the paramaters request list by seeing what options in options.c are
ored with OPTION_REQ in options.c
+ Fix dhcp renew forgetfullness on client (bug #1230)

7
README
View File

@@ -96,6 +96,12 @@ are:
will not change, however, the other DHCP paramaters, such as the
default gateway, subnet mask, and dns server may change.
nak: This argument is used with udhcpc receives a NAK message.
The script with the deconfig argument will be called directly
afterwards, so no changes to the network interface are neccessary.
This hook is provided for purely informational purposes (the
message option may contain a reason for the NAK).
The paramaters for enviromental variables are as follows:
$HOME - The set $HOME env or "/"
@@ -128,6 +134,7 @@ The paramaters for enviromental variables are as follows:
lease - The lease time, in seconds
dhcptype - DHCP message type (safely ignored)
serverid - The IP of the server
message - Reason for a DHCPNAK
tftp - The TFTP server name
bootfile - The bootfile name

View File

@@ -478,6 +478,7 @@ int main(int argc, char *argv[])
} else if (*message == DHCPNAK) {
/* return to init state */
LOG(LOG_INFO, "Received DHCP NAK");
run_script(&packet, "nak");
if (state != REQUESTING)
run_script(NULL, "deconfig");
state = INIT_SELECTING;