net/arp: dont learn arp information if interface is noarp

Dont learn arp information from ip packet if interface is noarp

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
gaohedong
2025-12-29 14:38:36 +08:00
committed by Xiang Xiao
parent 7e6138f258
commit ca7c6e2a6f
+3 -2
View File
@@ -83,8 +83,9 @@ void arp_ipin(FAR struct net_driver_s *dev)
* Ethernet link layer protocol.
*/
if (dev->d_lltype != NET_LL_ETHERNET &&
dev->d_lltype != NET_LL_IEEE80211)
if (IFF_IS_NOARP(dev->d_flags) ||
(dev->d_lltype != NET_LL_ETHERNET &&
dev->d_lltype != NET_LL_IEEE80211))
{
return;
}