blob: 1c1200aada63f49f247a90755ab77edcedeace48 [file] [log] [blame]
From 8365c6ab1e8cd26965303c1ed5d3d10e15487d6b Mon Sep 17 00:00:00 2001
From: Peter Qiu <zqiu@chromium.org>
Date: Wed, 20 May 2015 18:01:30 -0700
Subject: [PATCH] Stop ARP probes when conflict is detected
Currently, an ARP state is create for each IP when performing duplicate
address detection. However, when duplicate address is detected, the ARP
state for that IP doesn't get cleanup, causing the ARP request to be
sent continuously with a random timeout. All ARP states would eventually
get cleanup when a duplicate address detection succeed.
So clean up the ARP state when duplicate address is detected to avoid
generating unnecessary traffics and causing any problems with the dhcp
state machine.
BUG=chromium:495795
TEST=Run network_DhcpNak and verify no ARP request is sent for the failed
IP after failure is detected.
---
dhcp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dhcp.c b/dhcp.c
index feea34c..9a2bea1 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -2774,6 +2774,7 @@ dhcp_arp_conflicted(struct arp_state *astate, const struct arp_msg *amsg)
if (ia)
ipv4_deladdr(astate->iface, &ia->addr, &ia->net);
#endif
+ arp_close(astate->iface);
eloop_timeout_delete(astate->iface->ctx->eloop, NULL,
astate->iface);
eloop_timeout_add_sec(astate->iface->ctx->eloop,
--
2.2.0.rc0.207.ga3a616c