From nobody@FreeBSD.org  Fri Nov 30 16:41:11 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6112B16A420
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Nov 2007 16:41:11 +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 5462213C455
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Nov 2007 16:41:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lAUGewY7039618
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 30 Nov 2007 16:40:58 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lAUGew8D039617;
	Fri, 30 Nov 2007 16:40:58 GMT
	(envelope-from nobody)
Message-Id: <200711301640.lAUGew8D039617@www.freebsd.org>
Date: Fri, 30 Nov 2007 16:40:58 GMT
From: Alexander <fbsd@meersau.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pfctl help message options order false -t must before -T
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118355
>Category:       bin
>Synopsis:       [pf] [patch] pfctl(8) help message options order false -t must before -T
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-pf
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 16:50:00 UTC 2007
>Closed-Date:    
>Last-Modified:  Wed Jul 02 14:23:32 UTC 2008
>Originator:     Alexander
>Release:        5.5-STABLE
>Organization:
>Environment:
FreeBSD gaspode.meersau.de 5.5-STABLE FreeBSD 5.5-STABLE #11: Sat Nov 24 14:09:04 CET 2007     root@gaspode.meersau.de:/usr/obj/usr/src/sys/GASPODE  i386

>Description:
If I try to add a entry in a pf table the option -T must follow -t so this command fails:

% sudo pfctl -T add 86.51.7.205 -t badhosts
No ALTQ support in kernel
ALTQ related functions disabled
usage: pfctl [-AdeghNnOqRrvz] [-a anchor[:ruleset]] [-D macro=value]
             [-F modifier] [-f file] [-i interface] [-k host] [-p device]
             [-s modifier] [-T command [address ...]] [-t table] [-x level]
%

The help message does display the -t option behind -T.

I think it would be help to see the options in the right order.

Also the order in the manpage is to be corrected, but I don't know the syntax.
>How-To-Repeat:
pfctl -T add 86.51.7.205 -t badhosts
>Fix:
--- pfctl.c     Fri Nov 30 17:38:24 2007
+++ pfctl.c.orig        Fri Nov 30 17:37:34 2007
@@ -202,8 +202,8 @@
        fprintf(stderr, "[-F modifier] [-f file] [-i interface] ");
        fprintf(stderr, "[-k host] [-p device]\n");
        fprintf(stderr, "             ");
-       fprintf(stderr, "[-s modifier] [-t table] [-T command [address ...]] ");
-       fprintf(stderr, "[-x level]\n");
+       fprintf(stderr, "[-s modifier] [-T command [address ...]] ");
+       fprintf(stderr, "[-t table] [-x level]\n");
        exit(1);
 }



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-pf 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Nov 30 21:05:03 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118355 
>Unformatted:
