]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Zero the rset when we fallthrough the waiting for packet.
authorRoy Marples <roy@marples.name>
Mon, 21 Jan 2008 22:04:43 +0000 (22:04 +0000)
committerRoy Marples <roy@marples.name>
Mon, 21 Jan 2008 22:04:43 +0000 (22:04 +0000)
client.c

index ad2a192bd3dbb16c9381988e41f0ae8e143a80e2..47c72920d7e240b599965af7fd82f243c3a00302 100644 (file)
--- 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 &&