From nobody@FreeBSD.org  Wed May 14 13:53:49 2008
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 8D2141065679
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 14 May 2008 13:53:49 +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 7F98B8FC2B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 14 May 2008 13:53:49 +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 m4EDqe0d010757
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 14 May 2008 13:52:40 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m4EDqeC0010756;
	Wed, 14 May 2008 13:52:40 GMT
	(envelope-from nobody)
Message-Id: <200805141352.m4EDqeC0010756@www.freebsd.org>
Date: Wed, 14 May 2008 13:52:40 GMT
From: Andrey Groshev <greenx@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Pftop shows a wrong direction of filtering rules.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123670
>Category:       ports
>Synopsis:       sysutils/Pftop shows a wrong direction of filtering rules.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 14 14:00:03 UTC 2008
>Closed-Date:    Mon May 19 13:01:46 UTC 2008
>Last-Modified:  Mon May 19 13:10:01 UTC 2008
>Originator:     Andrey Groshev
>Release:        7-stable
>Organization:
SPC NT Azimut LTD,
>Environment:
>Description:
There is a small inconvenience in browse mode of rules (pftop-v rules).
If on a filtering rule the direction is not specified, pftop displays it as "In"  - is confuses.
Further my variant of correction of the given lack.
>How-To-Repeat:

>Fix:
--- pftop.c     2008-05-14 17:06:57.000000000 +0400
+++ pftop.c     2008-05-14 17:07:41.000000000 +0400
@@ -1461,6 +1461,7 @@
        static const char *actiontypes[] = { "Pass", "Block", "Scrub", "Nat",
            "no Nat", "Binat", "no Binat", "Rdr", "no Rdr" };
        int numact = sizeof(actiontypes) / sizeof(char *);
+       static const char *directtypes[] = { "n/a", "In", "Out" };

 #ifdef HAVE_PF_ROUTE
        static const char *routetypes[] = { "", "fastroute", "route-to",
@@ -1486,7 +1487,7 @@
        print_fld_size(FLD_BYTES, pr->bytes);
 #endif
        print_fld_uint(FLD_RULE, pr->nr);
-       print_fld_str(FLD_DIR, pr->direction == PF_OUT ? "Out" : "In");
+       print_fld_str(FLD_DIR, directtypes[pr->direction]);
        if (pr->quick)
                print_fld_str(FLD_QUICK, "Quick");

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Wed May 14 18:24:59 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123670 
State-Changed-From-To: open->closed 
State-Changed-By: wxs 
State-Changed-When: Mon May 19 13:01:45 UTC 2008 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123670 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/123670: commit references a PR
Date: Mon, 19 May 2008 13:01:39 +0000 (UTC)

 wxs         2008-05-19 13:01:33 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/pftop       Makefile 
     sysutils/pftop/files patch-pftop.c 
   Log:
   Update patch to properly display direction of filtering rules.
   Bump PORTREVISION.
   
   PR:             ports/123670
   Submitted by:   Andrey Groshev <greenx@yandex.ru>
   Reviewed by:    mlaier (maintainer)
   Approved by:    garga (mentor), mlaier (maintainer)
   
   Revision  Changes    Path
   1.12      +1 -0      ports/sysutils/pftop/Makefile
   1.2       +19 -4     ports/sysutils/pftop/files/patch-pftop.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
