net/arp: clean the arp table when netdev carrier off

Fix the arp address changed if netdev renew, since the
arp table should be cleared when the netdev carrier off

Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
This commit is contained in:
songlinzhang
2021-11-18 13:29:25 +08:00
committed by Xiang Xiao
parent 4db9513658
commit 22df553443
7 changed files with 104 additions and 18 deletions
+4 -3
View File
@@ -82,9 +82,10 @@
struct arp_entry_s
{
in_addr_t at_ipaddr; /* IP address */
struct ether_addr at_ethaddr; /* Hardware address */
clock_t at_time; /* Time of last usage */
in_addr_t at_ipaddr; /* IP address */
struct ether_addr at_ethaddr; /* Hardware address */
clock_t at_time; /* Time of last usage */
FAR struct net_driver_s *at_dev; /* The device driver structure */
};
/****************************************************************************