From 45b47734a0788721c76e3bb621a5133554e0a640 Mon Sep 17 00:00:00 2001 From: Stefan Brüns Date: Sun, 30 Aug 2015 17:46:54 +0200 Subject: net/arp: account for ARP delay, avoid duplicate packets on timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eth_rx() in the main reception loop may trigger sending a packet which is already timed out (or will immediately) upon reception of an ARP reply. As long as the ARP reply is pending, the timeout handler of a packet should be postponed. Happens on TFTP with bad network (e.g. WLAN). Signed-off-by: Stefan Brüns Acked-by: Joe Hershberger --- net/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net/net.c') diff --git a/net/net.c b/net/net.c index a115ce2892..6f75e3ce06 100644 --- a/net/net.c +++ b/net/net.c @@ -569,7 +569,9 @@ restart: goto done; } - arp_timeout_check(); + if (arp_timeout_check() > 0) { + time_start = get_timer(0); + } /* * Check for a timeout, and run the timeout handler -- cgit v1.2.3