diff mbox

[ovs-dev,v2,3/4] ovs-tcpdump: destroy_mirror should really destroy the mirror.

Message ID 1479115454-48163-4-git-send-email-nic@opencloud.tech
State Accepted
Headers show

Commit Message

nickcooper-zhangtonghao Nov. 14, 2016, 9:24 a.m. UTC
Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
---
 utilities/ovs-tcpdump.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Aaron Conole Nov. 14, 2016, 3:36 p.m. UTC | #1
nickcooper-zhangtonghao <nic@opencloud.tech> writes:

> Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>
diff mbox

Patch

diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index c189bc8..96aa1e2 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -230,7 +230,8 @@  class OVSDB(object):
                                  (port_name, txn.get_error()))
         self._txn = None
 
-    def destroy_mirror(self, mirror_name, bridge_name):
+    def destroy_mirror(self, intf_name, bridge_name):
+        mirror_name = 'm_%s' % intf_name
         if not self.mirror_exists(mirror_name):
             return
         txn = self._start_txn()
@@ -433,7 +434,7 @@  def main():
         raise KeyboardInterrupt
     except KeyboardInterrupt:
         pipes.terminate()
-        ovsdb.destroy_mirror('m%s' % interface, ovsdb.port_bridge(interface))
+        ovsdb.destroy_mirror(interface, ovsdb.port_bridge(interface))
         ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
     except Exception:
         print("Unable to tear down the ports and mirrors.")