Skip to content
Snippets Groups Projects
Commit 07e3da08 authored by Andrew Ferguson's avatar Andrew Ferguson
Browse files

adjust regex for finding mininet's links during cleanup

link names of the form "a-b-ethN" were previously interpreted
as "b-ethN". this change accepts link names with a dash, and
requires N to only contain digits.
parent dfd79bde
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ def cleanup():
sh( 'ovs-vsctl del-br ' + dp )
info( "*** Removing all links of the pattern foo-ethX\n" )
links = sh( r"ip link show | egrep -o '(\w+-eth\w+)'" ).split( '\n' )
links = sh( r"ip link show | egrep -o '([-_[:alnum:]]+-eth[[:digit:]]+)'" ).split( '\n' )
for link in links:
if link != '':
sh( "ip link del " + link )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment