aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/moongen/moongen.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-08-01 12:18:34 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-01 12:18:34 +0000
commit7ad56eff11393807085775f075fcc93640c26ce2 (patch)
tree8349809258153dd7a07afebc7fcd2b910ca2e964 /tools/pkt_gen/moongen/moongen.py
parent93e3095b4d7ea6b850b81858ec7ae2c1caaf0448 (diff)
parentb859be62b56f1e4cf1eaa534106311ff6ca60b1d (diff)
Merge "pkt_gen: MoonGen incorrectly inserting VLAN tag"
Diffstat (limited to 'tools/pkt_gen/moongen/moongen.py')
-rw-r--r--tools/pkt_gen/moongen/moongen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py
index 7af83f26..21dec9cc 100644
--- a/tools/pkt_gen/moongen/moongen.py
+++ b/tools/pkt_gen/moongen/moongen.py
@@ -138,8 +138,9 @@ class Moongen(ITrafficGenerator):
out_file.write("dstIp = \"" + \
str(traffic['l3']['dstip']) + "\",\n")
- out_file.write("vlanId = " + \
- str(traffic['vlan']['id']) + ",\n")
+ if traffic['vlan']['enabled']:
+ out_file.write("vlanId = " + \
+ str(traffic['vlan']['id']) + ",\n")
out_file.write("searchRunTime = " + \
str(duration) + ",\n")