From nobody@FreeBSD.org  Mon Jun 12 21:28:46 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8E6E716A418
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Jun 2006 21:28:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1440A43D66
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Jun 2006 21:28:41 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k5CLSfDD064376
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Jun 2006 21:28:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k5CLSfK5064375;
	Mon, 12 Jun 2006 21:28:41 GMT
	(envelope-from nobody)
Message-Id: <200606122128.k5CLSfK5064375@www.freebsd.org>
Date: Mon, 12 Jun 2006 21:28:41 GMT
From: Igor Russian <im@kaba.org.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ng_netflow not send data to flow collector
X-Send-Pr-Version: www-2.3

>Number:         98875
>Category:       kern
>Synopsis:       [netgraph] ng_netflow not send data to flow collector
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 12 21:30:26 GMT 2006
>Closed-Date:    Fri Aug 11 13:25:32 GMT 2006
>Last-Modified:  Fri Aug 11 13:25:32 GMT 2006
>Originator:     Igor Russian
>Release:        6.1-RELEASE
>Organization:
Kaba Ltd
>Environment:
FreeBSD esm.com.ua 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Sun Jun 11 11:12:58 EEST
2006     root@esm.com.ua:/usr/src/sys/i386/compile/ESM  i386
>Description:
ng_netflow config:

/usr/sbin/ngctl -f- <<-SEQ
 mkpeer vlan0: tee lower right
 connect vlan0: vlan0:lower upper left
 mkpeer vlan0:lower netflow right2left iface0
 name vlan0:lower.right2left netflow
 msg netflow: setifindex { iface=0 index=4 }

 mkpeer vlan23: tee lower right
 connect vlan23: vlan23:lower upper left
 connect netflow: vlan23:lower iface1 right2left
 msg netflow: setifindex { iface=1 index=15 }

 mkpeer netflow: ksocket export inet/dgram/udp
 msg netflow:export connect inet/127.0.0.1:9996
SEQ

Result of run command 'flowctl netflow show':
root@esm [4:22] /var/db/flows #flowctl netflow show
SrcIf         SrcIPaddress    DstIf         DstIPaddress    Pr SrcP DstP  Pkts
lo0           192.168.0.253   vlan0         192.168.0.254   17 e2ef 0035      6
lo0           192.168.0.253   vlan0         192.168.0.254    6 0016 ce2a     15
lo0           192.168.0.55    vlan0         192.168.0.255   17 0089 0089     12
lo0           192.168.0.253   vlan23        194.87.0.50      1 0000 0000      6

Flow collector:

root@esm [0:21] /root #pkg_info | grep flow
flow-tools-0.68_1   Suite of tools and library to work with netflow data

Check running collector:
root@esm [4:23] /var/db/flows #ps axww | grep flow
 2349  ??  Ss     0:00,01 /usr/local/bin/flow-capture -p /var/run/flow-capture.pid -w /var/db/flows -S5 -E5G 127.0.0.1/0/9996

But data on a collector do not get.


>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: glebius 
State-Changed-When: Fri Aug 11 13:24:04 UTC 2006 
State-Changed-Why:  
I have already explained this. ng_netflow(4) will send a full export 
datagram after it has expired 30 flows. Now, you have in cache few 
flows, and probably few expired. The datagram is waiting to be filled. 


Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Fri Aug 11 13:24:04 UTC 2006 
Responsible-Changed-Why:  
My module. 

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