From: Roy Marples Date: Fri, 20 Feb 2009 08:33:03 +0000 (+0000) Subject: If we fail to send a packet we should still continue our code path. X-Git-Tag: v5.0.0~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf6757c4d5365c4271b5332ee496e3d0a29719cb;p=thirdparty%2Fdhcpcd.git If we fail to send a packet we should still continue our code path. Existing failure timers should change it if needed. --- diff --git a/dhcpcd.c b/dhcpcd.c index 58b05061..41fc36f5 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -310,22 +310,10 @@ send_message(struct interface *iface, int type, syslog(LOG_ERR, "%s: send_raw_packet: %m", iface->name); } free(dhcp); - if (r == -1) { - /* We failed to send a packet? - * This should only happen if the link has gone down whilst - * we are working and managed to get here before we processed - * the link down message. - * Or we could be configured not to look at them or it's a - * buggy driver. Either way, we need to drop everything - * and start over. */ - drop_config(iface, "EXPIRE"); - close_sockets(iface); - delete_timeout(NULL, iface); - add_timeout_sec(DHCP_ARP_FAIL, start_interface, iface); - } else { - if (callback) - add_timeout_tv(&tv, callback, iface); - } + /* Even if we fail to send a packet we should continue as we are + * as our failure timeouts will change out codepath when needed. */ + if (callback) + add_timeout_tv(&tv, callback, iface); } static void