svn commit: r294203 - in stable/10/usr.sbin: arp ndp
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun Jan 17 06:03:00 UTC 2016
Author: melifaro
Date: Sun Jan 17 06:02:59 2016
New Revision: 294203
URL: https://svnweb.freebsd.org/changeset/base/294203
Log:
MFC r288297 (userland part).
If ever MFC is done for the new lltable code, this change will miminise
ABI breakage.
rtsock requests for deleting interface address lles started to return EPERM
instead of old "ignore-and-return 0" in r287789. This broke arp -da /
ndp -cn behavior (they exit on rtsock command failure). Fix this by
translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and
making arp/ndp ignore these entries in batched delete.
Modified:
stable/10/usr.sbin/arp/arp.c
stable/10/usr.sbin/ndp/ndp.c
Modified: stable/10/usr.sbin/arp/arp.c
==============================================================================
--- stable/10/usr.sbin/arp/arp.c Sun Jan 17 05:38:03 2016 (r294202)
+++ stable/10/usr.sbin/arp/arp.c Sun Jan 17 06:02:59 2016 (r294203)
@@ -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);
}
Modified: stable/10/usr.sbin/ndp/ndp.c
==============================================================================
--- stable/10/usr.sbin/ndp/ndp.c Sun Jan 17 05:38:03 2016 (r294202)
+++ stable/10/usr.sbin/ndp/ndp.c Sun Jan 17 06:02:59 2016 (r294203)
@@ -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;
More information about the svn-src-stable-10
mailing list