ports/168230: [PATCH] nfsen 1.3.5 has broken simultaneous sflow and netflow collection
Vincent Hoffman
vince at unsane.co.uk
Tue May 22 11:20:05 UTC 2012
>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 at 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:
More information about the freebsd-ports-bugs
mailing list