mirror of
https://github.com/apache/nuttx.git
synced 2026-09-26 09:54:24 +08:00
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:
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "netdev/netdev.h"
|
||||
#include "netlink/netlink.h"
|
||||
#include "arp/arp.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
@@ -94,6 +95,7 @@ int netdev_carrier_off(FAR struct net_driver_s *dev)
|
||||
/* Notify clients that the network has been taken down */
|
||||
|
||||
devif_dev_event(dev, NULL, NETDEV_DOWN);
|
||||
arp_cleanup(dev);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user