From: Roy Marples Date: Fri, 9 Oct 2009 19:00:34 +0000 (+0000) Subject: We need to ensure sockets are open for sending a DECLINE. X-Git-Tag: v5.1.2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=454959245c124fd191ed3ad59ba8b44d6c085741;p=thirdparty%2Fdhcpcd.git We need to ensure sockets are open for sending a DECLINE. --- diff --git a/dhcpcd.c b/dhcpcd.c index 535fa753..9adb2253 100644 --- 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) {