From 45b47734a0788721c76e3bb621a5133554e0a640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= 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/arp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/arp.h') diff --git a/net/arp.h b/net/arp.h index 43c6296..a288d61 100644 --- a/net/arp.h +++ b/net/arp.h @@ -25,7 +25,7 @@ void arp_init(void); void arp_request(void); void arp_raw_request(struct in_addr source_ip, const uchar *targetEther, struct in_addr target_ip); -void arp_timeout_check(void); +int arp_timeout_check(void); void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len); #endif /* __ARP_H__ */ -- cgit v1.1