utilities/ovs-tcpdump.in: Fix port lookups
authorAaron Conole <aconole@bytheb.org>
Fri, 1 Jul 2016 20:59:40 +0000 (16:59 -0400)
committerBen Pfaff <blp@ovn.org>
Sat, 2 Jul 2016 04:30:20 +0000 (21:30 -0700)
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>
utilities/ovs-tcpdump.in

index ba6ee9f..577f461 100755 (executable)
@@ -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: