summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2017-05-18 22:00:51 +0200
committerTomek Mrugalski <tomasz@isc.org>2017-05-18 22:00:51 +0200
commit36d1dc7926725065fd4aa1f105458e59644db09b (patch)
tree79efacb1041c8f44c9d7dab363766107cd4a6e1f
parent647226b8454a755b85e814a15f49716fcc8acadd (diff)
downloadisc-dhcp-36d1dc7926725065fd4aa1f105458e59644db09b.tar.gz
[19430] dhclient now calls script with reason=FAIL even with -1 option
-rw-r--r--RELNOTES5
-rw-r--r--client/dhclient.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/RELNOTES b/RELNOTES
index b5817c4b..bed0403b 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -54,6 +54,11 @@ by Eric Young (eay@cryptsoft.com).
Changes since 4.3.0 (new features)
+- Client now calls the script with reason set to FAIL when run with -1 (ony try)
+ and there are no sever responses. Thank you Andrew Pollock for providing
+ an initial patch.
+ [ISC-bugs #18183]
+
- Insert the raw data from a fully encapsualted option into the option cache.
This allows "exists" to check for the option if any sub options exist. It
also adds the raw data to the environment variables supplied to the client
diff --git a/client/dhclient.c b/client/dhclient.c
index cbf59379..2c26af11 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -1471,6 +1471,11 @@ void bind_lease (client)
if (!quiet)
log_info("Unable to obtain a lease on first "
"try (declined). Exiting.");
+
+ /* Let's call a script and we're done */
+ script_init(client, "FAIL", (struct string_list *)0);
+ script_go(client);
+
finish(2);
} else {
state_init(client);
@@ -2480,6 +2485,11 @@ void state_panic (cpp)
if (!quiet)
log_info ("Unable to obtain a lease on first try.%s",
" Exiting.");
+
+ /* Let's call a script and we're done */
+ script_init(client, "FAIL", (struct string_list *)0);
+ script_go(client);
+
finish(2);
}