--- dhcp-3.0.2/client/dhclient.c.dhclient_decline_backoff 2005-06-10 13:59:11.000000000 -0400 +++ dhcp-3.0.2/client/dhclient.c 2005-06-10 14:00:05.000000000 -0400 @@ -707,6 +707,7 @@ void *cpp; { struct client_state *client = cpp; + enum dhcp_state init_state = client -> state; ASSERT_STATE(state, S_INIT); @@ -719,9 +720,20 @@ client -> first_sending = cur_time; client -> interval = client -> config -> initial_interval; - /* Add an immediate timeout to cause the first DHCPDISCOVER packet - to go out. */ - send_discover (client); + if ( init_state != S_DECLINED ) + { + /* Add an immediate timeout to cause the first DHCPDISCOVER packet + to go out. */ + send_discover (client); + }else + { + /* We've received an OFFER and it has been DECLINEd by dhclient-script. + * wait for a random time between 1 and backoff_cutoff seconds before trying again. + */ + add_timeout( cur_time + (( 1 + (random () >> 2) ) % client -> config -> backoff_cutoff), + send_discover, client, 0, 0 + ); + } } /* state_selecting is called when one or more DHCPOFFER packets have been @@ -994,6 +1006,7 @@ send_decline (client); destroy_client_lease (client -> new); client -> new = (struct client_lease *)0; + client -> state = S_DECLINED; state_init (client); return; } --- dhcp-3.0.2/includes/dhcpd.h.dhclient_decline_backoff 2005-06-10 13:59:11.000000000 -0400 +++ dhcp-3.0.2/includes/dhcpd.h 2005-06-10 13:59:11.000000000 -0400 @@ -658,7 +658,8 @@ S_BOUND = 5, S_RENEWING = 6, S_REBINDING = 7, - S_STOPPED = 8 + S_STOPPED = 8, + S_DECLINED= 9 }; /* Authentication and BOOTP policy possibilities (not all values work