From 263eee56ae3a0d4aa2b48cd1afb42de3b1ddee65 Mon Sep 17 00:00:00 2001 From: stevenvanrossem Date: Wed, 8 Feb 2017 01:04:36 +0100 Subject: [PATCH] fix bug - vlan was added to monitoring links on single switch paths --- src/emuvim/dcemulator/net.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 30b7ce2..af6fbad 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -456,6 +456,7 @@ class DCNetwork(Containernet): kwargs['switch_inport_name'] = src_sw_inport_name kwargs['switch_outport_name'] = dst_sw_outport_name kwargs['skip_vlan_tag'] = True + kwargs['pathindex'] = i monitor_placement = kwargs.get('monitor_placement').strip() # put monitor flow at the dst switch @@ -615,10 +616,9 @@ class DCNetwork(Containernet): switch_inport_nr = src_sw_inport_nr # choose free vlan - ## if path contains more than 1 switch cmd = kwargs.get('cmd') vlan = None - if cmd == 'add-flow' and len(path) > 1: + if cmd == 'add-flow': if kwargs.get('tag'): # use pre-defined tag vlan = kwargs.get('tag') -- 2.25.1