From andy@fud.org.nz  Tue Nov  9 23:57:39 2004
Return-Path: <andy@fud.org.nz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3713916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  9 Nov 2004 23:57:39 +0000 (GMT)
Received: from thingy.tbd.co.nz (thingy.tbd.co.nz [210.48.70.194])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 095F043D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  9 Nov 2004 23:57:38 +0000 (GMT)
	(envelope-from andy@fud.org.nz)
Received: from thingy.tbd.co.nz (localhost [127.0.0.1])
	by thingy.tbd.co.nz (8.12.3/8.12.3/Debian-7.1) with ESMTP id iAA017AX018524
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 10 Nov 2004 13:01:07 +1300
Received: (from thompsa@localhost)
	by thingy.tbd.co.nz (8.12.3/8.12.3/Debian-7.1) id iAA016xm018522
	for FreeBSD-gnats-submit@freebsd.org; Wed, 10 Nov 2004 13:01:06 +1300
Message-Id: <20041110000106.GA17542@thingy.tbd.co.nz>
Date: Wed, 10 Nov 2004 13:01:06 +1300
From: Andrew Thompson <andy@fud.org.nz>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [maintainer-update] update net/pfflowd to 0.6

>Number:         73752
>Category:       ports
>Synopsis:       [maintainer-update] update net/pfflowd to 0.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 10 00:00:52 GMT 2004
>Closed-Date:    Wed Nov 10 21:07:15 GMT 2004
>Last-Modified:  Wed Nov 10 21:07:15 GMT 2004
>Originator:     Andrew Thompson
>Release:        FreeBSD 5.3-BETA6 i386
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: FreeBSD hudson.fire.org.nz 5.3-BETA6 FreeBSD 5.3-BETA6 #0: Sat Oct 16 09:21:06 NZDT 2004 root@hudson.fire.org.nz:/usr/obj/usr/src/sys/HUDSON i386


	<machine, os, target, libraries (multiple lines)>
>Description:
update net/pfflowd from 0.5 to 0.6

>How-To-Repeat:
	<code/input/activities to reproduce the problem (multiple lines)>
>Fix:

Apply patch (also avaiable @ http://www.fud.org.nz/~andy/pfflowd_05-06.diff)



diff -urN net/pfflowd.orig/Makefile net/pfflowd/Makefile
--- net/pfflowd.orig/Makefile	Sat Aug 21 01:18:34 2004
+++ net/pfflowd/Makefile	Wed Nov 10 11:31:39 2004
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	pfflowd
-PORTVERSION=	0.5
+PORTVERSION=	0.6
 CATEGORIES=	net
 MASTER_SITES=	http://www.mindrot.org/files/pfflowd/
 
diff -urN net/pfflowd.orig/distinfo net/pfflowd/distinfo
--- net/pfflowd.orig/distinfo	Tue Jun 15 19:31:49 2004
+++ net/pfflowd/distinfo	Wed Nov 10 11:31:39 2004
@@ -1,2 +1,2 @@
-MD5 (pfflowd-0.5.tar.gz) = d25ea182952c6da381e81be05a81475f
-SIZE (pfflowd-0.5.tar.gz) = 12001
+MD5 (pfflowd-0.6.tar.gz) = c2d7bfff10594ffd3f50a7c54f8d9304
+SIZE (pfflowd-0.6.tar.gz) = 12925
diff -urN net/pfflowd.orig/files/patch-pfflowd.c net/pfflowd/files/patch-pfflowd.c
--- net/pfflowd.orig/files/patch-pfflowd.c	Tue Jun 15 19:31:50 2004
+++ net/pfflowd/files/patch-pfflowd.c	Wed Nov 10 11:31:39 2004
@@ -1,6 +1,6 @@
---- pfflowd.c	Thu May  6 16:06:45 2004
-+++ pfflowd.c	Tue Jun 15 09:40:46 2004
-@@ -43,7 +43,11 @@
+--- pfflowd.c.orig	Tue Nov  9 15:05:07 2004
++++ pfflowd.c	Tue Nov  9 15:07:12 2004
+@@ -40,7 +40,11 @@
  #include <syslog.h>
  #include <time.h>
  #include <unistd.h>
@@ -9,49 +9,17 @@
 +#else
  #include <util.h>
 +#endif
+ #include <netdb.h>
+ #include "pfflowd.h"
  
- #define	PROGNAME		"pfflowd"
- #define	PROGVER			"0.5"
-@@ -189,6 +193,9 @@
- parse_hostport(const char *s, struct sockaddr_in *addr)
+@@ -115,9 +119,7 @@
+ /* Signal handlers */
+ static void sighand_exit(int signum)
  {
- 	char *host, *port;
-+#if defined(__FreeBSD__)
-+	int val;
-+#endif
+-	struct syslog_data sd = SYSLOG_DATA_INIT;
+-
+-	syslog_r(LOG_INFO, &sd, "%s exiting on signal %d", PROGNAME, signum);
++	syslog(LOG_INFO, "%s exiting on signal %d", PROGNAME, signum);
  
- 	if ((host = strdup(s)) == NULL) {
- 		fprintf(stderr, "Out of memory\n");
-@@ -201,12 +208,22 @@
- 	}
- 	*(port - 1) = '\0';
- 	addr->sin_family = AF_INET;
-+#if defined(__FreeBSD__)
-+	val = atoi(port);
-+	if (val <= 0 || val >= 65536) {
-+		fprintf(stderr, "Invalid -n port.\n");
-+		usage();
-+		exit(1);
-+	}
-+	addr->sin_port = (in_port_t)val;
-+#else
- 	addr->sin_port = atoi(port);
- 	if (addr->sin_port <= 0 || addr->sin_port >= 65536) {
- 		fprintf(stderr, "Invalid -n port.\n");
- 		usage();
- 		exit(1);
- 	}
-+#endif
- 	addr->sin_port = htons(addr->sin_port);
- 	if (inet_aton(host, &addr->sin_addr) == 0) {
- 		fprintf(stderr, "Invalid -n host.\n");
-@@ -425,7 +442,9 @@
- 				strlcat(dst_s, pbuf, sizeof(dst_s));
- 			}
- 
-+#ifndef OLD_PFSYNC
- 			syslog(LOG_DEBUG, "IFACE %s\n", st->ifname); 
-+#endif
- 			syslog(LOG_DEBUG, "GWY %s\n", rt_s); 
- 			syslog(LOG_DEBUG, "FLOW proto %d direction %d", 
- 			    st->proto, st->direction);
+ 	_exit(0);
+ }
>Release-Note:
>Audit-Trail:

From: Andrew Thompson <andy@fud.org.nz>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/73752: [maintainer-update] update net/pfflowd to 0.6
Date: Wed, 10 Nov 2004 14:00:18 +1300

 Corrected patch attached, fix build with -DOLD_PFSYNC (pre pf v3.5).
 The copy @ http://www.fud.org.nz/~andy/pfflowd_05-06.diff has been
 corrected too.
 
 thanks
 
 
 diff -urN net/pfflowd.orig/Makefile net/pfflowd/Makefile
 --- net/pfflowd.orig/Makefile	Sat Aug 21 01:18:34 2004
 +++ net/pfflowd/Makefile	Wed Nov 10 11:31:39 2004
 @@ -6,7 +6,7 @@
  #
  
  PORTNAME=	pfflowd
 -PORTVERSION=	0.5
 +PORTVERSION=	0.6
  CATEGORIES=	net
  MASTER_SITES=	http://www.mindrot.org/files/pfflowd/
  
 diff -urN net/pfflowd.orig/distinfo net/pfflowd/distinfo
 --- net/pfflowd.orig/distinfo	Tue Jun 15 19:31:49 2004
 +++ net/pfflowd/distinfo	Wed Nov 10 11:31:39 2004
 @@ -1,2 +1,2 @@
 -MD5 (pfflowd-0.5.tar.gz) = d25ea182952c6da381e81be05a81475f
 -SIZE (pfflowd-0.5.tar.gz) = 12001
 +MD5 (pfflowd-0.6.tar.gz) = c2d7bfff10594ffd3f50a7c54f8d9304
 +SIZE (pfflowd-0.6.tar.gz) = 12925
 diff -urN net/pfflowd.orig/files/patch-pfflowd.c net/pfflowd/files/patch-pfflowd.c
 --- net/pfflowd.orig/files/patch-pfflowd.c	Tue Jun 15 19:31:50 2004
 +++ net/pfflowd/files/patch-pfflowd.c	Wed Nov 10 13:48:46 2004
 @@ -1,6 +1,6 @@
 ---- pfflowd.c	Thu May  6 16:06:45 2004
 -+++ pfflowd.c	Tue Jun 15 09:40:46 2004
 -@@ -43,7 +43,11 @@
 +--- pfflowd.c.orig	Tue Sep  7 00:25:57 2004
 ++++ pfflowd.c	Wed Nov 10 13:46:53 2004
 +@@ -40,7 +40,11 @@
   #include <syslog.h>
   #include <time.h>
   #include <unistd.h>
 @@ -9,49 +9,37 @@
  +#else
   #include <util.h>
  +#endif
 + #include <netdb.h>
 + #include "pfflowd.h"
   
 - #define	PROGNAME		"pfflowd"
 - #define	PROGVER			"0.5"
 -@@ -189,6 +193,9 @@
 - parse_hostport(const char *s, struct sockaddr_in *addr)
 +@@ -115,9 +119,7 @@
 + /* Signal handlers */
 + static void sighand_exit(int signum)
   {
 - 	char *host, *port;
 -+#if defined(__FreeBSD__)
 -+	int val;
 -+#endif
 +-	struct syslog_data sd = SYSLOG_DATA_INIT;
 +-
 +-	syslog_r(LOG_INFO, &sd, "%s exiting on signal %d", PROGNAME, signum);
 ++	syslog(LOG_INFO, "%s exiting on signal %d", PROGNAME, signum);
   
 - 	if ((host = strdup(s)) == NULL) {
 - 		fprintf(stderr, "Out of memory\n");
 -@@ -201,12 +208,22 @@
 - 	}
 - 	*(port - 1) = '\0';
 - 	addr->sin_family = AF_INET;
 -+#if defined(__FreeBSD__)
 -+	val = atoi(port);
 -+	if (val <= 0 || val >= 65536) {
 -+		fprintf(stderr, "Invalid -n port.\n");
 -+		usage();
 -+		exit(1);
 -+	}
 -+	addr->sin_port = (in_port_t)val;
 -+#else
 - 	addr->sin_port = atoi(port);
 - 	if (addr->sin_port <= 0 || addr->sin_port >= 65536) {
 - 		fprintf(stderr, "Invalid -n port.\n");
 - 		usage();
 - 		exit(1);
 - 	}
 + 	_exit(0);
 + }
 +@@ -366,7 +368,9 @@
 + 				strlcat(dst_s, pbuf, sizeof(dst_s));
 + 			}
 + 
 ++#ifndef OLD_PFSYNC
 + 			syslog(LOG_DEBUG, "IFACE %s", st[i].ifname); 
  +#endif
 - 	addr->sin_port = htons(addr->sin_port);
 - 	if (inet_aton(host, &addr->sin_addr) == 0) {
 - 		fprintf(stderr, "Invalid -n host.\n");
 -@@ -425,7 +442,9 @@
 + 			syslog(LOG_DEBUG, "GWY %s", rt_s); 
 + 			syslog(LOG_DEBUG, "FLOW proto %d direction %d", 
 + 			    st[i].proto, st[i].direction);
 +@@ -538,7 +542,9 @@
   				strlcat(dst_s, pbuf, sizeof(dst_s));
   			}
   
  +#ifndef OLD_PFSYNC
 - 			syslog(LOG_DEBUG, "IFACE %s\n", st->ifname); 
 + 			syslog(LOG_DEBUG, "IFACE %s", st[i].ifname); 
  +#endif
 - 			syslog(LOG_DEBUG, "GWY %s\n", rt_s); 
 + 			syslog(LOG_DEBUG, "GWY %s", rt_s); 
   			syslog(LOG_DEBUG, "FLOW proto %d direction %d", 
 - 			    st->proto, st->direction);
 + 			    st[i].proto, st[i].direction);
 
 
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Wed Nov 10 21:07:06 GMT 2004 
State-Changed-Why:  
committed, thanks 

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