Bug #9486

ifindex values used for softflowd are incorrect

Added by Jesse White about 2 years ago. Updated almost 2 years ago.

Very Low
Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
Affected Architecture:


With this patch, we now pass ifIndex values to softflowd for inclusion in the flow packets:

However, the values used are arbitrary and do not line up with the values used by other services on the system such as snmpd:

ps  ax | grep soft
91600  -  Ss    0:00.64 /usr/local/sbin/softflowd -i 1:igb1 -n -v 5 -T full -t general=60 -p /var/run/ -c /var/r
91913  -  Is    0:00.00 /usr/local/sbin/softflowd -i 2:igb1.2 -n -v 5 -T full -t general=60 -p /var/run/ -c /v
92156  -  Is    0:00.00 /usr/local/sbin/softflowd -i 3:igb1.3 -n -v 5 -T full -t general=60 -p /var/run/ -c /v
92774  -  Is    0:00.00 /usr/local/sbin/softflowd -i 4:ovpnc2 -n -v 5 -T full -t general=60 -p /var/run/ -c /v
93644  -  Ss    0:00.69 /usr/local/sbin/softflowd -i 5:igb0 -n -v 5 -T full -t general=60 -p /var/run/ -c /var/r
93969  -  Is    0:00.00 /usr/local/sbin/softflowd -i 6:lo0 -n -v 5 -T full -t general=60 -p /var/run/ -c /var/run

$ snmpwalk -c public -v 2c IF-MIB::ifDescr
IF-MIB::ifDescr.1 = STRING: igb0
IF-MIB::ifDescr.2 = STRING: igb1
IF-MIB::ifDescr.3 = STRING: enc0
IF-MIB::ifDescr.4 = STRING: lo0
IF-MIB::ifDescr.5 = STRING: pflog0
IF-MIB::ifDescr.6 = STRING: pfsync0
IF-MIB::ifDescr.7 = STRING: igb1.2
IF-MIB::ifDescr.8 = STRING: igb1.3
IF-MIB::ifDescr.9 = STRING: ovpnc2

For example igb1.2 is set to ifIndex 2, but it should really be 7.

The proper ifIndex can be retrieved using:


#1 Updated by Jim Pingle almost 2 years ago

  • Project changed from pfSense to pfSense Packages
  • Category set to softflowd
  • Priority changed from Normal to Very Low
  • Affected Version deleted (2.4.4_2)

Not sure there is a viable way for the softflowd to do that. The linked function is a C function in FreeBSD, but the code generating the softflowd config is PHP. Writing a C program just for getting the index seems excessive.

I had hoped maybe the output of ifconfig -l might be useful but it doesn't line up with the index values used by SNMP either.

Also available in: Atom PDF