diff mbox

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

Message ID 1467406781-1964-2-git-send-email-aconole@redhat.com
State Accepted
Headers show

Commit Message

Aaron Conole July 1, 2016, 8:59 p.m. UTC
From: Aaron Conole <aconole@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@redhat.com>
Tested-by: Jean-Tsung Hsiao <jhsiao@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 utilities/ovs-tcpdump.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

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: