summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2016-09-26 09:24:09 +0300
committerJohn Lo <loj@cisco.com>2016-09-27 14:57:35 +0000
commita4509cfd468cddbc4c1e913f76185760bda02760 (patch)
treec35e1ff5c9ff61893ca9152328170e12dfb90034 /vnet
parent1e7658340ac4cba20defba056c2e13ec0e1a0a69 (diff)
fix create sub-interface range cli
the create sub interface command was creating the interfaces with the same outer_vlan value - causing an error changed to use the interface id as outer_vlan in case of a range Change-Id: I3808094d1c99a37adac61e3ece573a6687306461 Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/interface_cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vnet/vnet/interface_cli.c b/vnet/vnet/interface_cli.c
index f7d42a722d5..611ce28140b 100644
--- a/vnet/vnet/interface_cli.c
+++ b/vnet/vnet/interface_cli.c
@@ -636,7 +636,6 @@ create_sub_interfaces (vlib_main_t * vm,
else if (unformat (input, "%d-%d", &id_min, &id_max))
{
template.sub.eth.flags.one_tag = 1;
- template.sub.eth.outer_vlan_id = id_min;
template.sub.eth.flags.exact_match = 1;
if (id_min > id_max)
goto id_error;
@@ -689,6 +688,9 @@ create_sub_interfaces (vlib_main_t * vm,
template.type = VNET_SW_INTERFACE_TYPE_SUB;
template.sup_sw_if_index = hi->sw_if_index;
template.sub.id = id;
+ if (id_min < id_max)
+ template.sub.eth.outer_vlan_id = id;
+
error = vnet_create_sw_interface (vnm, &template, &sw_if_index);
if (error)
goto done;