From nobody@FreeBSD.org  Tue May 22 11:19:36 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6F32F1065673
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 May 2012 11:19:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 40F7C8FC1C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 May 2012 11:19:36 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4MBJZQ9024528
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 May 2012 11:19:35 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q4MBJZSr024527;
	Tue, 22 May 2012 11:19:35 GMT
	(envelope-from nobody)
Message-Id: <201205221119.q4MBJZSr024527@red.freebsd.org>
Date: Tue, 22 May 2012 11:19:35 GMT
From: Vincent Hoffman <vince@unsane.co.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] nfsen 1.3.5 has broken simultaneous sflow and netflow collection
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: janos.mohacsi@bsd.hu

>Number:         168230
>Category:       ports
>Synopsis:       [PATCH] net-mgmt/nfsen 1.3.5 has broken simultaneous sflow and netflow collection
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    scheidell
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 22 11:20:04 UTC 2012
>Closed-Date:    Sat Jun 09 23:35:45 UTC 2012
>Last-Modified:  Sat Jun  9 23:40:07 UTC 2012
>Originator:     Vincent Hoffman
>Release:        8.3-RELEASE
>Organization:
>Environment:
FreeBSD seaurchin.namesco.net 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:23:18 UTC 2012     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Using a config with both sflow and netflow is broken in 1.3.5 release 
see
http://sourceforge.net/tracker/?func=detail&aid=3204087&group_id=134525&atid=730182

It will be fixed in the next release, I have attached a modified version of the patch in the bug report on sourceforge.


>How-To-Repeat:
have a config similar to 
%sources = (
    'the3'   => { 'port'    => '9997', 'col' => '#0000ff', 'type' => 'netflow' },
    'thn3'   => { 'port'    => '9996', 'col' => '#00ff00', 'type' => 'netflow' },
    'bmk1'   => { 'port'    => '9998', 'col' => '#f3f162', 'type' => 'sflow' },
);

(mixed netflow and sflow) restart nfsen
>Fix:
apply patch below.


Patch attached with submission follows:

--- libexec/NfSenRC.pm	2010-09-09 07:56:05.000000000 +0200
+++ libexec/NfSenRC.pm.patched	2011-03-09 13:09:32.000000000 +0100
@@ -54,22 +54,21 @@
 		print "[no collector]";
 		return;
 	}
-
 	my @SourceList;
 	my $type = undef;
 	foreach my $source ( sort keys %NfConf::sources ) {
 		my $_port = $NfConf::sources{$source}{'port'};
 		if ( $_port == $port ) {
 			push @SourceList, $source;
-		}
-		my $_type = exists $NfConf::sources{$source}{'type'} ? $NfConf::sources{$source}{'type'}: 'netflow';
-		if ( defined $type ) {
-			if ( $type ne $_type ) {
-				print "Can not start different type '$type' and '$_type' on same port!\n";
-				return;
+			my $_type = exists $NfConf::sources{$source}{'type'} ? $NfConf::sources{$source}{'type'}: 'netflow';
+			if ( defined $type ) {
+				if ( $type ne $_type ) {
+					print "Can not start different type '$type' and '$_type' on same port!\n";
+					return;
+				}
+			} else {
+				$type = $_type;
 			}
-		} else {
-			$type = $_type;
 		}
 	}
 


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue May 22 16:52:10 UTC 2012 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: janos.mohacsi@bsd.hu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/168230: [PATCH] net-mgmt/nfsen 1.3.5 has broken simultaneous sflow and netflow collection
Date: Tue, 22 May 2012 16:52:06 UT

 Maintainer of net-mgmt/nfsen,
 
 Please note that PR ports/168230 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/168230
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->open 
State-Changed-By: scheidell 
State-Changed-When: Fri Jun 8 12:53:10 UTC 2012 
State-Changed-Why:  
Maintainer feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168230 
Responsible-Changed-From-To: freebsd-ports-bugs->scheidell 
Responsible-Changed-By: scheidell 
Responsible-Changed-When: Sat Jun 9 16:43:50 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168230 
State-Changed-From-To: open->closed 
State-Changed-By: scheidell 
State-Changed-When: Sat Jun 9 23:35:44 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/168230: commit references a PR
Date: Sat,  9 Jun 2012 23:35:31 +0000 (UTC)

 scheidell    2012-06-09 23:35:21 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/nfsen       Makefile 
   Added files:
     net-mgmt/nfsen/files patch-libexec__NFSenRC.pm 
   Log:
   - Fix config with both sflow and netflow
   - Bump PORTREVISION
   
   PR:             ports/168230
   Submitted by:   Vincent Hoffman <vince@unsane.co.uk>
   Approved by:    maintainer (timeout, 15 days)
   
   Revision  Changes    Path
   1.19      +1 -1      ports/net-mgmt/nfsen/Makefile
   1.1       +32 -0     ports/net-mgmt/nfsen/files/patch-libexec__NFSenRC.pm (new)
 _______________________________________________
 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:
