summaryrefslogtreecommitdiffstats
path: root/net/net.c
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2015-08-30 17:46:54 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2015-10-28 14:57:37 -0500
commit45b47734a0788721c76e3bb621a5133554e0a640 (patch)
treefb8b5ce5c47435ff1683d918c563e48436809e5b /net/net.c
parent943231119f3caaaca7db4c588e4f3e9a6cec426a (diff)
downloadtalos-obmc-uboot-45b47734a0788721c76e3bb621a5133554e0a640.tar.gz
talos-obmc-uboot-45b47734a0788721c76e3bb621a5133554e0a640.zip
net/arp: account for ARP delay, avoid duplicate packets on timeout
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 <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c4
1 files changed, 3 insertions, 1 deletions
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
OpenPOWER on IntegriCloud