]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] dhclient now calls script with reason=FAIL even with -1 option
authorTomek Mrugalski <tomasz@isc.org>
Thu, 22 Jun 2017 13:59:56 +0000 (15:59 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 22 Jun 2017 13:59:56 +0000 (15:59 +0200)
# Merge from rt18183
# Conflicts:
# RELNOTES
# client/dhclient.c

RELNOTES
client/dhclient.c

index 3c5f78b730adb4367550cd42d7531349f1a945a9..62d742114c04815ae6ed8555182d2da296bd690d 100644 (file)
--- 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
 
index fd5ac2df46a593ff41e4d0270c5664a6d5be249c..aadf2b3374b0d4a2f374b3f1fdf5a942f92d6434 100644 (file)
@@ -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);
        }