summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorAaron Conole <aconole@bytheb.org>2016-07-01 16:59:40 -0400
committerBen Pfaff <blp@ovn.org>2016-07-01 21:30:20 -0700
commit312352673895035bfa286f8cf7c3627d580fdc2b (patch)
treeb6bf8a19269ea1af1b13566e18e3c208579bd941 /utilities
parentf5d29e922c0ee44999955dc7f1de37e9e3225527 (diff)
downloadopenvswitch-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-xutilities/ovs-tcpdump.in3
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: