Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2008 15:20:04 +0200
From:      Max Laier <max@love2party.net>
To:        freebsd-pf@freebsd.org
Subject:   Re: pftop 0.7 in ports ?
Message-ID:  <200804011520.04872.max@love2party.net>
In-Reply-To: <200804011424.25499.max@love2party.net>
References:  <47F1735B.9060707@gibfest.dk> <200804011424.25499.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_Eaj8H4g51pl4PB2
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 01 April 2008 14:24:25 Max Laier wrote:
> On Tuesday 01 April 2008 01:27:23 Thomas Rasmussen wrote:
> > Any plans to update pftop in ports to 0.7 ?
> >
> > http://www.eee.metu.edu.tr/~canacar/pftop/ says:
> > Changes in version 0.7:
> > This version adds state filtering......
> >
> > It would be very nice to have that on FreeBSD as well.
>
> I'll have a go at it, stay tuned.

Here you go, please test.

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--Boundary-00=_Eaj8H4g51pl4PB2
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="pftop-0.7.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="pftop-0.7.diff"

Index: Makefile
===================================================================
RCS file: /usr/store/mlaier/fcvs/ports/sysutils/pftop/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	8 Sep 2007 18:14:51 -0000	1.9
+++ Makefile	1 Apr 2008 13:07:02 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	pftop
-PORTVERSION=	0.6
+PORTVERSION=	0.7
 CATEGORIES=	sysutils net
 MASTER_SITES=	http://www.eee.metu.edu.tr/~canacar/
 DISTNAME=	${PORTNAME}-${PORTVERSION}
@@ -45,6 +45,10 @@
 post-patch:
 	@${REINPLACE_CMD} -e 's|<sys/queue.h>|"${FILESDIR}/queue.h"|g' \
 	    ${WRKSRC}/engine.c
+	@${REINPLACE_CMD} -e 's|__dead|__dead2|g' ${WRKSRC}/sf-gencode.h
+	@${REINPLACE_CMD} -e 's|__dead|__dead2|g' ${WRKSRC}/sf-gencode.c
+	@${REINPLACE_CMD} -e 's|#include <net/if_pflog.h>||g' \
+	    ${WRKSRC}/sf-gencode.c
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/pftop ${PREFIX}/sbin
Index: distinfo
===================================================================
RCS file: /usr/store/mlaier/fcvs/ports/sysutils/pftop/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo	8 Sep 2007 18:14:51 -0000	1.6
+++ distinfo	1 Apr 2008 12:31:34 -0000
@@ -1,3 +1,3 @@
-MD5 (pftop-0.6.tar.gz) = c84fb960d36e9a9271c211c98efae062
-SHA256 (pftop-0.6.tar.gz) = bc6e9f93405b6a941074e4e5454adb56c63e24b3def4660d32c826237a8faaba
-SIZE (pftop-0.6.tar.gz) = 26236
+MD5 (pftop-0.7.tar.gz) = 2fdef1e3fffc38ae40f27aa2dfdcf6fc
+SHA256 (pftop-0.7.tar.gz) = afde859fab77597e4aae1ef6b87f1bb26a5ad8cb2b1d7316a12e5098153492af
+SIZE (pftop-0.7.tar.gz) = 59765
Index: files/patch-ab
===================================================================
RCS file: files/patch-ab
diff -N files/patch-ab
--- files/patch-ab	29 Jan 2006 04:44:00 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-*** pftop.c.orig	Tue Jan 10 21:06:14 2006
---- pftop.c	Sat Jan 21 04:47:06 2006
-***************
-*** 2215,2226 ****
-  	tb_print_fromto(&pr->src, &pr->dst, pr->af, pr->proto);
-  #ifdef HAVE_RULE_UGID
-  	if (pr->uid.op)
-  		tb_print_ugid(pr->uid.op, pr->uid.uid[0], pr->uid.uid[1],
-! 		        "user", UID_MAX);
-  	if (pr->gid.op)
-  		tb_print_ugid(pr->gid.op, pr->gid.gid[0], pr->gid.gid[1],
-! 		        "group", GID_MAX);
-  #endif
-  
-  	if (pr->flags || pr->flagset) {
-  		tbprintf(" flags ");
---- 2215,2226 ----
-  	tb_print_fromto(&pr->src, &pr->dst, pr->af, pr->proto);
-  #ifdef HAVE_RULE_UGID
-  	if (pr->uid.op)
-  		tb_print_ugid(pr->uid.op, pr->uid.uid[0], pr->uid.uid[1],
-! 		        "user", UINT_MAX);
-  	if (pr->gid.op)
-  		tb_print_ugid(pr->gid.op, pr->gid.gid[0], pr->gid.gid[1],
-! 		        "group", UINT_MAX);
-  #endif
-  
-  	if (pr->flags || pr->flagset) {
-  		tbprintf(" flags ");
Index: files/patch-pftop.c
===================================================================
RCS file: files/patch-pftop.c
diff -N files/patch-pftop.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-pftop.c	1 Apr 2008 13:16:05 -0000
@@ -0,0 +1,40 @@
+*** pftop.c.orig	2007-11-07 07:36:46.000000000 +0100
+--- pftop.c	2008-04-01 15:14:04.666339681 +0200
+***************
+*** 1570,1579 ****
+  #ifdef HAVE_RULE_UGID
+  	if (pr->uid.op)
+  		tb_print_ugid(pr->uid.op, pr->uid.uid[0], pr->uid.uid[1],
+! 		        "user", UID_MAX);
+  	if (pr->gid.op)
+  		tb_print_ugid(pr->gid.op, pr->gid.gid[0], pr->gid.gid[1],
+! 		        "group", GID_MAX);
+  #endif
+  
+  	if (pr->flags || pr->flagset) {
+--- 1570,1579 ----
+  #ifdef HAVE_RULE_UGID
+  	if (pr->uid.op)
+  		tb_print_ugid(pr->uid.op, pr->uid.uid[0], pr->uid.uid[1],
+! 		        "user", UINT_MAX);
+  	if (pr->gid.op)
+  		tb_print_ugid(pr->gid.op, pr->gid.gid[0], pr->gid.gid[1],
+! 		        "group", UINT_MAX);
+  #endif
+  
+  	if (pr->flags || pr->flagset) {
+***************
+*** 1765,1771 ****
+--- 1765,1776 ----
+  				  strerror(errno));
+  			return (-1);
+  		}
++ #ifdef PFALTQ_FLAG_IF_REMOVED
++ 		if (pa.altq.qid > 0 &&
++ 		    !(pa.altq.local_flags & PFALTQ_FLAG_IF_REMOVED)) {
++ #else
+  		if (pa.altq.qid > 0) {
++ #endif
+  			pq.nr = nr;
+  			pq.ticket = pa.ticket;
+  			pq.buf = &qstats;
Index: files/patch-sf-scanner.l
===================================================================
RCS file: files/patch-sf-scanner.l
diff -N files/patch-sf-scanner.l
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-sf-scanner.l	1 Apr 2008 12:57:21 -0000
@@ -0,0 +1,19 @@
+*** sf-scanner.l.orig	2007-11-07 07:34:18.000000000 +0100
+--- sf-scanner.l	2008-04-01 14:48:15.639616549 +0200
+***************
+*** 233,239 ****
+  			size_t len = strlen(yytext) * 4 + 1;
+  			char *v = malloc(len);
+  			if (v != NULL)
+! 				strnvis(v, yytext, len, 0);
+  			sf_error("illegal token: %s", v);
+  			free(v);
+  			}
+--- 233,239 ----
+  			size_t len = strlen(yytext) * 4 + 1;
+  			char *v = malloc(len);
+  			if (v != NULL)
+! 				strvis(v, yytext, 0);
+  			sf_error("illegal token: %s", v);
+  			free(v);
+  			}

--Boundary-00=_Eaj8H4g51pl4PB2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804011520.04872.max>