1 diff -up dhcp-4.3.1b1/client/dhclient.c.JwFUZj dhcp-4.3.1b1/client/dhclient.c
2 --- dhcp-4.3.1b1/client/dhclient.c.JwFUZj 2014-07-10 17:38:50.511265091 +0200
3 +++ dhcp-4.3.1b1/client/dhclient.c 2014-07-10 17:39:16.164901267 +0200
4 @@ -1281,6 +1281,8 @@ void state_init (cpp)
7 struct client_state *client = cpp;
8 + enum dhcp_state init_state = client->state;
11 ASSERT_STATE(state, S_INIT);
13 @@ -1293,9 +1295,18 @@ void state_init (cpp)
14 client -> first_sending = cur_time;
15 client -> interval = client -> config -> initial_interval;
17 - /* Add an immediate timeout to cause the first DHCPDISCOVER packet
19 - send_discover (client);
20 + if (init_state != S_DECLINED) {
21 + /* Add an immediate timeout to cause the first DHCPDISCOVER packet
23 + send_discover(client);
25 + /* We've received an OFFER and it has been DECLINEd by dhclient-script.
26 + * wait for a random time between 1 and backoff_cutoff seconds before
28 + tv . tv_sec = cur_time + ((1 + (random() >> 2)) % client->config->backoff_cutoff);
30 + add_timeout(&tv, send_discover, client, 0, 0);
35 @@ -1592,6 +1603,7 @@ void bind_lease (client)
36 "try (declined). Exiting.");
39 + client -> state = S_DECLINED;
43 @@ -4059,6 +4071,7 @@ void client_location_changed ()
50 client -> state = S_INIT;
51 diff -up dhcp-4.3.1b1/includes/dhcpd.h.JwFUZj dhcp-4.3.1b1/includes/dhcpd.h
52 --- dhcp-4.3.1b1/includes/dhcpd.h.JwFUZj 2014-07-10 17:38:26.941599360 +0200
53 +++ dhcp-4.3.1b1/includes/dhcpd.h 2014-07-10 17:38:50.526264878 +0200
54 @@ -1087,7 +1087,8 @@ enum dhcp_state {
63 /* Authentication and BOOTP policy possibilities (not all values work