From c62d0d0875ac7dc59456fb1426f18d508ae7ac23 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Mon, 8 Sep 2025 11:24:08 +0800 Subject: [PATCH] netlib_setarp.c: add ATF_PERM to mark arp entry as permanent Improve the behavior of the ARP table so that the manually configured ARP table has the highest priority, can only be manually modified to other values, otherwise will never change again, and will not time out. Signed-off-by: zhanghongyu --- netutils/netlib/netlib_setarp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/netutils/netlib/netlib_setarp.c b/netutils/netlib/netlib_setarp.c index 88dbba810..1c2261d4c 100644 --- a/netutils/netlib/netlib_setarp.c +++ b/netutils/netlib/netlib_setarp.c @@ -78,6 +78,7 @@ int netlib_set_arpmapping(FAR const struct sockaddr_in *inaddr, req.arp_ha.sa_family = ARPHRD_ETHER; memcpy(&req.arp_ha.sa_data, macaddr, ETHER_ADDR_LEN); + req.arp_flags = ATF_PERM; if (ifname != NULL) { strlcpy((FAR char *)&req.arp_dev, ifname,