Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ifIndex in FLOW->if_index_in and FLOW->if_index_out set to 0 #3

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Analyze source code from files netflow1.c and netflow5.c 
2. Look for following snippet in function send_netflow_v[15]:
if (j == 0) {
                        memset(&packet, '\0', sizeof(packet));

3. Run tcpdump and see generated netflow packets.

According to IF MIB Definition of ifIndex 
(http://net-snmp.sourceforge.net/docs/mibs/IF-MIB.txt) ifIndex has to be 
greater than zero. Right now both ifIndex fields in every flow are set to 0.
The problem applies to version 0.9.8 and 0.9.9.

Because of the problem Netflow Analyzer Enterprise Edition from from 
ManageEngine (http://www.manageengine.com/products/netflow/) refuses to see 
such flows.

The problem can be fixed with following code:
flw->if_index_out = flw->if_index_in = htons(1);
It's necessary to add the string in the functions send_netflow_v[15] just 
before following code:
offset += sizeof(*flw);
j++;

I attached full patch for it.

Or try to map SNMP-index of given on command line interface name.
But it's more complicated.

With best regards,
Maxim Zimovets

Original issue reported on code.google.com by [email protected] on 20 Apr 2012 at 5:46

Attachments:

@GoogleCodeExporter
Copy link
Author

Does the attachment, netflow.patch work for netflow v9? 

Original comment by [email protected] on 3 Apr 2013 at 1:54

@GoogleCodeExporter
Copy link
Author

No, I was not interseted in Netflow v9 at that time.

Original comment by [email protected] on 4 Apr 2013 at 10:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant