2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ovs-dpctl-top: Skip "eth()" element.

With commit efde188622 ("odp-util: Print eth() for Ethernet flows if
packet_type is absent.") "eth()" is printed for Ethernet flows if packet_type
is absent, but this broke "ovs-dpctl-top" since it expects that every
element has a value.

This commit skips the parsing of the empty "eth()" element.

Fixes: efde188622 ("odp-util: Print eth() for Ethernet flows if packet_type is absent.")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Timothy Redaelli
2020-06-19 15:53:52 +02:00
committed by Ilya Maximets
parent 046321d483
commit 6a328b6e24

View File

@@ -480,6 +480,8 @@ def elements_to_dict(elements):
""" Convert line to a hierarchy of dictionaries. """
result = {}
for element in elements:
if (element == "eth()"):
continue
match = FIELDS_CMPND.search(element)
if (match):
key = match.group(1)