bin/136661: ndp ignores -f option
Alexander V. Chernikov
melifaro at ipfw.ru
Sat Jul 11 13:30:02 UTC 2009
>Number: 136661
>Category: bin
>Synopsis: ndp ignores -f option
>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: Sat Jul 11 13:30:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Alexander V. Chernikov
>Release: 8.0-CURRENT
>Organization:
>Environment:
FreeBSD ws.ipfw.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #6: Sat Jun 20 20:59:45 MSD 2009 root at ws.ipfw.ru:/usr/obj/usr/src/sys/WS amd64
>Description:
According to ndp(8) manpage and ndp usage() -f flags can be used to make ndp parse file with ndp entries.
There is getopt "f:" option and file() function in ndp.c,
but there is no dispatcher of 'f' mode in second switch {}
>How-To-Repeat:
ktrace -tn ndp -f /dev/null ; kdump | grep /dev/null
>Fix:
Apply attached patch
Patch attached with submission follows:
--- usr.sbin/ndp/ndp.c.orig 2009-07-11 17:12:43.000000000 +0400
+++ usr.sbin/ndp/ndp.c 2009-07-11 17:14:35.000000000 +0400
@@ -246,6 +246,8 @@
}
delete(arg);
break;
+ case 'f':
+ exit(file(arg) ? 1 : 0);
case 'I':
#ifdef SIOCSDEFIFACE_IN6 /* XXX: check SIOCGDEFIFACE_IN6 as well? */
if (argc > 1) {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list