]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix infinite timeouts.
authorRoy Marples <roy@marples.name>
Thu, 8 May 2008 11:00:15 +0000 (11:00 +0000)
committerRoy Marples <roy@marples.name>
Thu, 8 May 2008 11:00:15 +0000 (11:00 +0000)
client.c

index 2fc52dc2153c4922983d850be67befb8aaf17f98..bcd3b643558b39d9a7dc17ac94a9b749860c6d8c 100644 (file)
--- a/client.c
+++ b/client.c
@@ -921,7 +921,7 @@ handle_timeout(struct if_state *state, const struct options *options)
                        break;
                }
                state->state = STATE_RENEWING;
-               state->xid = (uint32_t) random ();
+               state->xid = (uint32_t)random();
                /* FALLTHROUGH */
        case STATE_RENEWING:
                iface->start_uptime = uptime();
@@ -1156,9 +1156,9 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp,
                                logger(LOG_DEBUG, "rebind in %u seconds",
                                       lease->rebindtime);
 
+                       state->timeout = lease->renewaltime;
                }
 
-               state->timeout = lease->renewaltime;
                state->state = STATE_BOUND;
        }