changeset 957:2e99ade041ca draft

Fix renewing.
author Roy Marples <roy@marples.name>
date Mon, 08 Sep 2008 11:28:12 +0000
parents d3c7e3e5c40b
children 7f0ccb87d638
files dhcpcd.c
diffstat 1 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/dhcpcd.c	Mon Sep 08 08:19:06 2008 +0000
+++ b/dhcpcd.c	Mon Sep 08 11:28:12 2008 +0000
@@ -300,18 +300,6 @@
 	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 @@
 	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)
 {