summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2017-06-22 15:59:56 +0200
committerTomek Mrugalski <tomasz@isc.org>2017-06-22 15:59:56 +0200
commitb16ddfe1960a09cbb01dce6410483042e3f5f086 (patch)
tree7fb3bbae6490a4e2d2cf08fd6c25a7f5bf2ec025
parent637e1af87177387ee1e463b8a4718f0c1ea73af5 (diff)
downloadisc-dhcp-b16ddfe1960a09cbb01dce6410483042e3f5f086.tar.gz
[v4_1_esv] dhclient now calls script with reason=FAIL even with -1 option
# Merge from rt18183 # Conflicts: # RELNOTES # client/dhclient.c
-rw-r--r--RELNOTES5
-rw-r--r--client/dhclient.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/RELNOTES b/RELNOTES
index 3c5f78b7..62d74211 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -162,6 +162,11 @@ by Eric Young (eay@cryptsoft.com).
binding out-of-range and no other leases were available to offer.
[ISC-Bugs #44373]
+- Client now calls the script with reason set to FAIL when run with -1
+ (one try) and there are no server responses. Thanks for a patch by Martin
+ Pitt which got to us via Andrew Pollock.
+ [ISC-bugs #18183]
+
Changes since 4.1-ESV-R14b1
- None
diff --git a/client/dhclient.c b/client/dhclient.c
index fd5ac2df..aadf2b33 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -1272,6 +1272,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);
+
exit(2);
} else {
state_init(client);
@@ -2082,6 +2087,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);
+
exit (2);
}