summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-02-20 08:33:03 +0000
committerRoy Marples <roy@marples.name>2009-02-20 08:33:03 +0000
commitcf6757c4d5365c4271b5332ee496e3d0a29719cb (patch)
treefcbd7a5afbcecf1c8fbf18a54d65ce136adb155f
parent62b44b40217d4e6b7e8b2b555b1e284713de2dd0 (diff)
downloaddhcpcd-cf6757c4d5365c4271b5332ee496e3d0a29719cb.tar.xz
If we fail to send a packet we should still continue our code path.
Existing failure timers should change it if needed.
-rw-r--r--dhcpcd.c20
1 files changed, 4 insertions, 16 deletions
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