Page MenuHomeVyOS Platform

Flow-accounting bug with subinterfaces
Closed, ResolvedPublicBUG

Description

When we use subinterfaces we get errors.
Tested configuration.

set interfaces ethernet eth0 vif 555 address '10.0.0.1/30'

set system flow-accounting interface 'eth0.555'
set system flow-accounting netflow engine-id '100'
set system flow-accounting netflow server 192.168.122.12 port '9997'
set system flow-accounting netflow timeout expiry-interval '30'
set system flow-accounting netflow timeout flow-generic '3600'
set system flow-accounting netflow timeout icmp '300'
set system flow-accounting netflow timeout max-active-life '604800'
set system flow-accounting netflow timeout tcp-fin '300'
set system flow-accounting netflow timeout tcp-generic '3600'
set system flow-accounting netflow timeout tcp-rst '120'
set system flow-accounting netflow timeout udp '300'
set system flow-accounting netflow version '9'

Generate 10K packets from 10.0.0.2 to host 10.0.0.1

sudo ping -f 10.0.0.1 -c 10000

Show flow-accounting.

vyos@r-roll:~$ show flow-accounting 
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/flow_accounting_op.py", line 220, in <module>
    _flows_table_print(tabledata)
  File "/usr/libexec/vyos/op_mode/flow_accounting_op.py", line 159, in _flows_table_print
    table_body.append([flow['iface_in_name'], flow['mac_src'], flow['mac_dst'], flow['ip_src'], flow['ip_dst'], flow['port_src'], flow['port_dst'], flow['ip_proto'], flow['tos'], flow['packets'], flow['flows'], flow['bytes'] ])
KeyError: 'ip_proto'

There is no problem using eth0 interfaces (without subinterfaces).

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202007070117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)