From f4aa2058db1cf32fe40c104449f50ced272390f2 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Thu, 31 Mar 2011 00:03:07 -0400 Subject: [PATCH] Get rid of a very old blocking sleep that triggered after a DHCP NAK is received. --- ndhc/packet.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ndhc/packet.c b/ndhc/packet.c index 1dd93e2..7e51ed0 100644 --- a/ndhc/packet.c +++ b/ndhc/packet.c @@ -1,5 +1,5 @@ /* packet.c - send and react to DHCP message packets - * Time-stamp: <2011-03-30 23:57:14 nk> + * Time-stamp: <2011-03-31 00:01:50 nk> * * (c) 2004-2011 Nicholas J. Kain * (c) 2001 Russ Dill @@ -289,12 +289,10 @@ static void dhcp_ack_or_nak_packet(struct client_state_t *cs, if (cs->dhcpState != DS_REQUESTING) ifchange(NULL, IFCHANGE_DECONFIG); cs->dhcpState = DS_INIT_SELECTING; - cs->timeout = 0; + cs->timeout = 5000; cs->requestedIP = 0; cs->packetNum = 0; change_listen_mode(cs, LM_RAW); - // XXX: this isn't rfc compliant: should be exp backoff - sleep(3); /* avoid excessive network traffic */ } }