]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ovs-tcpdump: Fix an undefined variable
authorHyong Youb Kim <hyonkim@cisco.com>
Sat, 2 Feb 2019 07:19:40 +0000 (23:19 -0800)
committerBen Pfaff <blp@ovn.org>
Mon, 4 Feb 2019 20:28:09 +0000 (12:28 -0800)
Run ovs-tcpdump without --span, and it throws the following
exception. Define mirror_select_all to avoid the error.

Traceback (most recent call last):
  File "/usr/local/bin/ovs-tcpdump", line 488, in <module>
    main()
  File "/usr/local/bin/ovs-tcpdump", line 454, in main
    mirror_select_all)
UnboundLocalError: local variable 'mirror_select_all' referenced before assignment

Fixes: 0475db71c650 ("ovs-tcpdump: Add --span to mirror all ports on bridge.")
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
utilities/ovs-tcpdump.in

index 22f249f584ce40c09b397a8cfe9f1e7dfb7744f9..269c252f8aa701a7a4a0152c963f28c94b226296 100755 (executable)
@@ -379,6 +379,7 @@ def main():
 
     skip_next = False
     mirror_interface = None
+    mirror_select_all = False
     dump_cmd = 'tcpdump'
 
     for cur, nxt in argv_tuples(sys.argv[1:]):