From owner-freebsd-pf@FreeBSD.ORG Tue Apr 1 13:22:12 2008 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C9D9106566B for ; Tue, 1 Apr 2008 13:22:12 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.freebsd.org (Postfix) with ESMTP id 961248FC32 for ; Tue, 1 Apr 2008 13:22:11 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-064-190-098.pools.arcor-ip.net [88.64.190.98]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1JggRG2N9w-0000oy; Tue, 01 Apr 2008 15:22:10 +0200 Received: (qmail 46598 invoked from network); 1 Apr 2008 13:21:14 -0000 Received: from myhost.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 1 Apr 2008 13:21:14 -0000 From: Max Laier Organization: FreeBSD To: freebsd-pf@freebsd.org Date: Tue, 1 Apr 2008 15:20:04 +0200 User-Agent: KMail/1.9.9 References: <47F1735B.9060707@gibfest.dk> <200804011424.25499.max@love2party.net> In-Reply-To: <200804011424.25499.max@love2party.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Eaj8H4g51pl4PB2" Message-Id: <200804011520.04872.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19wY5MugbWsYwGuD0nFy16CerWkQEqAj5xAZf+ Ri6H31w+nje+UmSZOwGM3gbiy41sWUAq9FYVk31Ng+BYxDpiC7 Bgsz+j7HB5FJVyA3f+F4w== Cc: Subject: Re: pftop 0.7 in ports ? X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2008 13:22:12 -0000 --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||"${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 ||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--