Skip to content

Commit

Permalink
ovs-tcpdump: Fix an undefined variable
Browse files Browse the repository at this point in the history
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: 0475db7 ("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>
  • Loading branch information
Hyong Youb Kim authored and blp committed Feb 4, 2019
1 parent 606d876 commit bb6c1b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utilities/ovs-tcpdump.in
Expand Up @@ -377,6 +377,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:]):
Expand Down

0 comments on commit bb6c1b8

Please sign in to comment.