]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[19430] dhclient now calls script with reason=FAIL even with -1 option
authorTomek Mrugalski <tomasz@isc.org>
Thu, 18 May 2017 20:00:51 +0000 (22:00 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 21 Jun 2017 17:22:30 +0000 (19:22 +0200)
RELNOTES
client/dhclient.c

index b5817c4bf4955525e67ae14472b6e6f746f3dabe..bed0403b79fae5f7e2d04e1405bd4ba4d78f9c1a 100644 (file)
--- 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
index ad3c899bea60b757366cc1ebeefb51f625cead15..1f07d20cb7038d764e9d31687ee22cab9cb59182 100644 (file)
@@ -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);
        }