]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Re add the code to re-send message now - last time sent >= TIMOUT_MINI just incase.
authorRoy Marples <roy@marples.name>
Tue, 29 Jan 2008 11:12:59 +0000 (11:12 +0000)
committerRoy Marples <roy@marples.name>
Tue, 29 Jan 2008 11:12:59 +0000 (11:12 +0000)
client.c

index 6b0c22fefc47b14e767e06a214f1444a9aff1a1e..5d82cc73c0b9e6e3cb736c2e5c358f3139b1f829 100644 (file)
--- a/client.c
+++ b/client.c
@@ -450,10 +450,16 @@ static int wait_for_packet (fd_set *rset, state_t *state,
                return (retval);
        }
 
+       /* Resend our message if we're getting loads of packets.
+       * As we use BPF or LPF, we shouldn't hit this as much, but it's
+       * still nice to have. */
+       if (iface->fd > -1 && uptime () - state->last_sent >= TIMEOUT_MINI)
+               _send_message (state, state->last_type, options);
+
        logger (LOG_DEBUG, "waiting on select for %ld seconds",
                (unsigned long) state->timeout);
        /* If we're waiting for a reply, then we re-send the last
-          DHCP request periodically in-case of a bad line */
+        * DHCP request periodically in-case of a bad line */
        retval = 0;
        while (state->timeout > 0 && retval == 0) {
                if (iface->fd == -1)