bugfix - only print MAC on PHYs, not sub-interfaces

This commit is contained in:
Pim van Pelt
2022-04-15 10:46:36 +00:00
parent 58cf9e6b0c
commit e6f271181b

View File

@ -75,7 +75,7 @@ class Dumper(VPPApi):
if not self.cache['interfaces'][idx].flags & 1: # IF_STATUS_API_FLAG_ADMIN_UP if not self.cache['interfaces'][idx].flags & 1: # IF_STATUS_API_FLAG_ADMIN_UP
i['state'] = 'down' i['state'] = 'down'
if iface.interface_dev_type == 'dpdk': if iface.interface_dev_type == 'dpdk' and iface.sub_number_of_tags == 0:
i['mac'] = str(iface.l2_address) i['mac'] = str(iface.l2_address)
if self.tap_is_lcp(iface.interface_name): if self.tap_is_lcp(iface.interface_name):