This is an automated email from the ASF dual-hosted git repository.
ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new c62d0d087 netlib_setarp.c: add ATF_PERM to mark arp entry as permanent
c62d0d087 is described below
commit c62d0d0875ac7dc59456fb1426f18d508ae7ac23
Author: zhanghongyu <[email protected]>
AuthorDate: Mon Sep 8 11:24:08 2025 +0800
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 <[email protected]>
---
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,