mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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 <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
63e2650487
commit
c62d0d0875
1 changed files with 1 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue