summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/arp/arp.c5
-rw-r--r--usr.sbin/ndp/ndp.c2
2 files changed, 6 insertions, 1 deletions
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 ada1822..c2fe869 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -655,6 +655,8 @@ again:;
if (rtm->rtm_flags & RTF_CLONED)
delete(host_buf);
#else
+ if (rtm->rtm_flags & RTF_PINNED)
+ continue;
delete(host_buf);
#endif
continue;
OpenPOWER on IntegriCloud