]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We need to ensure sockets are open for sending a DECLINE.
authorRoy Marples <roy@marples.name>
Fri, 9 Oct 2009 19:00:34 +0000 (19:00 +0000)
committerRoy Marples <roy@marples.name>
Fri, 9 Oct 2009 19:00:34 +0000 (19:00 +0000)
dhcpcd.c

index 535fa753e141ca1d96ab40f9f6fea8f28e47a132..9adb225319636df4e65cd75d126ca27f0ef20599 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -394,12 +394,6 @@ start_expire(void *arg)
                start_interface(iface);
 }
 
-void
-send_decline(struct interface *iface)
-{
-       send_message(iface, DHCP_DECLINE, NULL);
-}
-
 static void
 log_dhcp(int lvl, const char *msg,
     const struct interface *iface, const struct dhcp_message *dhcp)
@@ -722,6 +716,13 @@ send_release(struct interface *iface)
        unlink(iface->leasefile);
 }
 
+void
+send_decline(struct interface *iface)
+{
+       open_sockets(iface);
+       send_message(iface, DHCP_DECLINE, NULL);
+}
+
 static void
 configure_interface1(struct interface *iface)
 {