mirror of
https://github.com/apache/nuttx.git
synced 2026-05-12 01:42:49 +08:00
net/arp: fix the problem of arp notify and flood arp sending
when a arp response reached, it should notify all tasks waiting the address. if the address is unreachable, do not send arp request to prevent arp flooding. Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
This commit is contained in:
@@ -205,7 +205,6 @@ void arp_notify(in_addr_t ipaddr)
|
||||
|
||||
curr->nt_result = OK;
|
||||
nxsem_post(&curr->nt_sem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -253,7 +253,7 @@ void arp_out(FAR struct net_driver_s *dev)
|
||||
{
|
||||
/* No send ARP if the interface forbidden */
|
||||
|
||||
if (IFF_IS_NOARP(dev->d_flags))
|
||||
if (IFF_IS_NOARP(dev->d_flags) || ret == -ENETUNREACH)
|
||||
{
|
||||
ninfo("ARP not supported on %s, no send!\n", dev->d_ifname);
|
||||
dev->d_len = 0;
|
||||
|
||||
Reference in New Issue
Block a user