diff options
-rw-r--r-- | sys/netinet/in.c | 2 | ||||
-rw-r--r-- | sys/netinet6/in6.c | 2 | ||||
-rw-r--r-- | usr.sbin/arp/arp.c | 5 | ||||
-rw-r--r-- | usr.sbin/ndp/ndp.c | 2 |
4 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index b582ba1..1441936 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1333,6 +1333,8 @@ in_lltable_dump_entry(struct lltable *llt, struct llentry *lle, arpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); if (lle->la_flags & LLE_STATIC) arpc.rtm.rtm_flags |= RTF_STATIC; + if (lle->la_flags & LLE_IFADDR) + arpc.rtm.rtm_flags |= RTF_PINNED; arpc.rtm.rtm_index = ifp->if_index; error = SYSCTL_OUT(wr, &arpc, sizeof(arpc)); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 9996dbf..af62ed1 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2354,6 +2354,8 @@ in6_lltable_dump_entry(struct lltable *llt, struct llentry *lle, ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); if (lle->la_flags & LLE_STATIC) ndpc.rtm.rtm_flags |= RTF_STATIC; + if (lle->la_flags & LLE_IFADDR) + ndpc.rtm.rtm_flags |= RTF_PINNED; ndpc.rtm.rtm_index = ifp->if_index; error = SYSCTL_OUT(wr, &ndpc, sizeof(ndpc)); diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 60f776f..eefde75 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -673,10 +673,13 @@ print_entry(struct sockaddr_dl *sdl, */ static void nuke_entry(struct sockaddr_dl *sdl __unused, - struct sockaddr_in *addr, struct rt_msghdr *rtm __unused) + struct sockaddr_in *addr, struct rt_msghdr *rtm) { char ip[20]; + if (rtm->rtm_flags & RTF_PINNED) + return; + snprintf(ip, sizeof(ip), "%s", inet_ntoa(addr->sin_addr)); delete(ip); } diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 4837b06..a14520c 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -649,6 +649,8 @@ again:; if (rtm->rtm_flags & RTF_CLONED) delete(host_buf); #else + if (rtm->rtm_flags & RTF_PINNED) + continue; delete(host_buf); #endif continue; |