aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-02-15 14:16:26 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-16 16:21:22 +0000
commit6085e16d924f12d57779d7d7692016ec9fc19a9d (patch)
tree8e2ed82de83bdc0d41af9907c567b9052165e8b7
parent7bc731047d87bffa51581e3d08e21410858d2010 (diff)
Fix NSH-LISP interface addition
Change-Id: I3925d2ebb2d26c676fc61f118d25bdf7fd522f26 Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/vnet/lisp-gpe/interface.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/vnet/lisp-gpe/interface.c b/src/vnet/lisp-gpe/interface.c
index d12dc362..d2664a49 100644
--- a/src/vnet/lisp-gpe/interface.c
+++ b/src/vnet/lisp-gpe/interface.c
@@ -833,6 +833,22 @@ lisp_gpe_add_del_iface_command_fn (vlib_main_t * vm, unformat_input_t * input,
}
}
+ if (nsh_iface)
+ {
+ if (is_add)
+ {
+ if (~0 == lisp_gpe_add_nsh_iface (&lisp_gpe_main))
+ {
+ return clib_error_return (0, "NSH interface not created");
+ }
+ }
+ else
+ {
+ lisp_gpe_del_nsh_iface (&lisp_gpe_main);
+ }
+ return (NULL);
+ }
+
if (vrf_is_set && bd_index_is_set)
return clib_error_return (0,
"Cannot set both vrf and brdige domain index!");
@@ -864,21 +880,6 @@ lisp_gpe_add_del_iface_command_fn (vlib_main_t * vm, unformat_input_t * input,
lisp_gpe_tenant_l3_iface_unlock (vni);
}
- if (nsh_iface)
- {
- if (is_add)
- {
- if (~0 == lisp_gpe_add_nsh_iface (&lisp_gpe_main))
- {
- return clib_error_return (0, "NSH interface not created");
- }
- else
- {
- lisp_gpe_del_nsh_iface (&lisp_gpe_main);
- }
- }
- }
-
return (NULL);
}