[netflow-tools] softflowd statistics bug

Robin Breathe rbreathe at brookes.ac.uk
Tue Sep 27 21:28:16 EST 2005


In softflowd.c, it is falsely assumed that every expired flow will lead
to 2 exports.
This has made testing of the other bug (in flowd) a little harder as
softflowd reports that it has exported more flows than it really has.

Line 782: ft->flows_exported += num_expired * 2;
Line 786: ft->flows_dropped += num_expired * 2;

In the case of a unidirectional flow, this is not the case.

The flows_exported case is relatively easy to fix, the flows_dropped
case probably isn't worth it.

I'm happy to work on a patch, but how would you rather I approach it?

1) Have send_netflow_*() return a new struct:
   { u_int32_t num_packets; uint32_t num_flows }

2) Add such a struct to struct FLOWTRACK and have send_netflow_*()
initialise and update it on each expiry run.

3) ...something else?

Robin Breathe, Computer Services, Oxford Brookes University, Oxford, UK
rbreathe at brookes.ac.uk       Tel: +44 1865 483685  Fax: +44 1865 483073

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.mindrot.org/pipermail/netflow-tools/attachments/20050927/acf4c96b/attachment.bin 

More information about the netflow-tools mailing list