Date: Sun, 17 Jan 2016 06:02:59 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294203 - in stable/10/usr.sbin: arp ndp Message-ID: <201601170602.u0H62xth070227@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601170602.u0H62xth070227>