diff options
author | Aaron Conole <aconole@bytheb.org> | 2016-07-01 16:59:40 -0400 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-07-01 21:30:20 -0700 |
commit | 312352673895035bfa286f8cf7c3627d580fdc2b (patch) | |
tree | b6bf8a19269ea1af1b13566e18e3c208579bd941 /utilities | |
parent | f5d29e922c0ee44999955dc7f1de37e9e3225527 (diff) | |
download | openvswitch-312352673895035bfa286f8cf7c3627d580fdc2b.tar.gz |
utilities/ovs-tcpdump.in: Fix port lookups
The original implementation of ovs-tcpdump conflated interfaces and
ports needlessly. This commit changes ovs-tcpdump to only consider the
port name when looking up the corresponding bridge.
Reported-by: Jean-Tsung Hsiao <jhsiao@redhat.com>
Tested-by: Jean-Tsung Hsiao <jhsiao@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-x | utilities/ovs-tcpdump.in | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in index ba6ee9f65..577f461bf 100755 --- a/utilities/ovs-tcpdump.in +++ b/utilities/ovs-tcpdump.in @@ -168,8 +168,7 @@ class OVSDB(object): def port_bridge(self, port_name): try: - row = self._find_row_by_name('Interface', port_name) - port = self._find_row('Port', lambda x: row in x.interfaces) + port = self._find_row_by_name('Port', port_name) br = self._find_row('Bridge', lambda x: port in x.ports) return br.name except Exception: |