[ovs-dev] [PATCH 1/2] utilities/ovs-tcpdump.in: Fix port lookups

Aaron Conole aconole at redhat.com
Fri Jul 1 20:59:40 UTC 2016


From: Aaron Conole <aconole at bytheb.org>

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 at redhat.com>
Tested-by: Jean-Tsung Hsiao <jhsiao at redhat.com>
Signed-off-by: Aaron Conole <aconole at redhat.com>
---
 utilities/ovs-tcpdump.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index ba6ee9f..577f461 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:
-- 
2.5.5




More information about the dev mailing list