From: Roy Marples Date: Mon, 21 Jan 2008 22:04:43 +0000 (+0000) Subject: Zero the rset when we fallthrough the waiting for packet. X-Git-Tag: v3.2.3~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df445a1da1e60f4772141d93c1bace3cbc239eea;p=thirdparty%2Fdhcpcd.git Zero the rset when we fallthrough the waiting for packet. --- diff --git a/client.c b/client.c index ad2a192b..47c72920 100644 --- a/client.c +++ b/client.c @@ -411,8 +411,12 @@ static int wait_for_packet (fd_set *rset, state_t *state, if (! (state->timeout > 0 || (options->timeout == 0 && - (state->state != STATE_INIT || state->xid)))) + (state->state != STATE_INIT || state->xid)))) { + /* We need to zero our rset, otherwise we will block trying + * to read a signal. */ + FD_ZERO (rset); return (0); + } if ((options->timeout == 0 && state->xid) || (dhcp->leasetime == (unsigned) -1 &&