bin/82185: ndp command bug
SAKAI Hiroaki
sakai.hiroaki at finet.fujitsu.com
Mon Jun 13 06:40:03 GMT 2005
>Number: 82185
>Category: bin
>Synopsis: ndp command bug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 13 06:40:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: SAKAI Hiroaki
>Release: FreeBSD-4.10
>Organization:
FINET
>Environment:
FreeBSD newface.finet.fujitsu.co.jp 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Wed Jun 16 11:12:16 JST 2004 hsakai at newface.finet.fujitsu.co.jp:/usr/src/sys/compile/NEWFACE i386
>Description:
If we specify non-NDP entry on ndp command, longest-match NDP entry is deleted.
>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
#
>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);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list