You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
903 B
27 lines
903 B
diff -up dhcp-4.2.3/client/dhclient.c.decline-onetry dhcp-4.2.3/client/dhclient.c |
|
--- dhcp-4.2.3/client/dhclient.c.decline-onetry 2011-11-24 14:21:50.000000000 +0100 |
|
+++ dhcp-4.2.3/client/dhclient.c 2011-11-24 14:23:44.472893215 +0100 |
|
@@ -1704,11 +1704,18 @@ void bind_lease (client) |
|
if (script_go (client)) { |
|
make_decline (client, client -> new); |
|
send_decline (client); |
|
- destroy_client_lease (client -> new); |
|
- client -> new = (struct client_lease *)0; |
|
- client -> state = S_DECLINED; |
|
- state_init (client); |
|
- return; |
|
+ if (onetry) { |
|
+ if (!quiet) |
|
+ log_info ("Unable to obtain a lease on first try.%s", |
|
+ " Exiting."); |
|
+ exit (2); |
|
+ } else { |
|
+ destroy_client_lease (client -> new); |
|
+ client -> new = (struct client_lease *)0; |
|
+ client -> state = S_DECLINED; |
|
+ state_init (client); |
|
+ return; |
|
+ } |
|
} |
|
|
|
/* Write out the new lease if it has been long enough. */
|
|
|