From: Roy Marples Date: Mon, 8 Sep 2008 11:28:12 +0000 (+0000) Subject: Fix renewing. X-Git-Tag: v5.0.0~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c130b44207af00d374c6eee6c115b210a2b9bd49;p=thirdparty%2Fdhcpcd.git Fix renewing. --- diff --git a/dhcpcd.c b/dhcpcd.c index 7d6c35a1..95370339 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -300,18 +300,6 @@ send_renew(void *arg) send_message((struct interface *)arg, DHCP_REQUEST, send_renew); } -void -start_renew(void *arg) -{ - struct interface *iface = arg; - - syslog(LOG_INFO, "%s: renewing lease of %s", - iface->name, inet_ntoa(iface->state->lease.addr)); - iface->state->state = DHS_RENEWING; - iface->state->xid = arc4random(); - send_renew(iface); -} - static void send_rebind(void *arg) { @@ -650,6 +638,20 @@ start_discover(void *arg) send_discover(iface); } + +void +start_renew(void *arg) +{ + struct interface *iface = arg; + + syslog(LOG_INFO, "%s: renewing lease of %s", + iface->name, inet_ntoa(iface->state->lease.addr)); + iface->state->state = DHS_RENEWING; + iface->state->xid = arc4random(); + open_sockets(iface); + send_renew(iface); +} + void start_reboot(struct interface *iface) {