Bug 82185 - [patch] ndp(8) can delete the incorrect entry
Summary: [patch] ndp(8) can delete the incorrect entry
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-13 07:40 UTC by SAKAI Hiroaki
Modified: 2018-01-03 05:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SAKAI Hiroaki 2005-06-13 07:40:02 UTC
If we specify non-NDP entry on ndp command, longest-match NDP entry is deleted.

Fix: 

FreeBSD-4.11 and FreeBSD-5.4
/usr/src/usr.sbin/ndp/ndp.c:delete()

         if (IN6_ARE_ADDR_EQUAL(&sin->sin6_addr, &sin_m.sin6_addr)) {
                 if (sdl->sdl_family == AF_LINK &&
                     (rtm->rtm_flags & RTF_LLINFO) &&
                     !(rtm->rtm_flags & RTF_GATEWAY)) {
                         goto delete;
                 }
                 /*
                  * IPv4 arp command retries with sin_other = SIN_PROXY here.
                  */
                 fprintf(stderr, "delete: cannot delete non-NDP entry\n");
                 return 1;
         }
+        fprintf(stderr, "delete: can't locate %s\n",host);
+                 return 1;

 delete:
         if (sdl->sdl_family != AF_LINK) {
                 printf("cannot locate %s\n", host);
                 return (1);
         }
How-To-Repeat: # netstat -r -W | grep fec0 | grep link
fec0::                        link#2                        UC          0        0   1500     fxp1
# ndp -d fec0::1:1:1:1
fec0::1:1:1:1 (fec0::) deleted
# netstat -r -W | grep fec0 | grep link
#
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2010-01-16 21:06:40 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s)
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:15 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped