From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 11 13:30:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87C9E106564A for ; Sat, 11 Jul 2009 13:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 47B248FC22 for ; Sat, 11 Jul 2009 13:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6BDU2jM032813 for ; Sat, 11 Jul 2009 13:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6BDU2f5032805; Sat, 11 Jul 2009 13:30:02 GMT (envelope-from gnats) Resent-Date: Sat, 11 Jul 2009 13:30:02 GMT Resent-Message-Id: <200907111330.n6BDU2f5032805@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Alexander V. Chernikov" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 672DD1065672 for ; Sat, 11 Jul 2009 13:22:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 556748FC08 for ; Sat, 11 Jul 2009 13:22:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n6BDMtQu075867 for ; Sat, 11 Jul 2009 13:22:55 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n6BDMt7P075858; Sat, 11 Jul 2009 13:22:55 GMT (envelope-from nobody) Message-Id: <200907111322.n6BDMt7P075858@www.freebsd.org> Date: Sat, 11 Jul 2009 13:22:55 GMT From: "Alexander V. Chernikov" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/136661: ndp ignores -f option X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 13:30:02 -0000 >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@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: