From owner-freebsd-ports-bugs@FreeBSD.ORG Tue May 22 11:20:05 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F4551065672 for ; Tue, 22 May 2012 11:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 768DD8FC23 for ; Tue, 22 May 2012 11:20:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4MBK5Y1046216 for ; Tue, 22 May 2012 11:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4MBK5Bf046215; Tue, 22 May 2012 11:20:05 GMT (envelope-from gnats) Resent-Date: Tue, 22 May 2012 11:20:05 GMT Resent-Message-Id: <201205221120.q4MBK5Bf046215@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vincent Hoffman Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F32F1065673 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/168230: [PATCH] nfsen 1.3.5 has broken simultaneous sflow and netflow collection X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2012 11:20:05 -0000 >Number: 168230 >Category: ports >Synopsis: [PATCH] nfsen 1.3.5 has broken simultaneous sflow and netflow collection >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 22 11:20:04 UTC 2012 >Closed-Date: >Last-Modified: >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: >Unformatted: