summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-gpe/interface.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-10-16 05:48:23 -0700
committerFlorin Coras <florin.coras@gmail.com>2017-10-31 15:48:45 +0000
commit0a8840df8ea6d4936d080c111f2b361f575a773d (patch)
tree64b8acb835a3968a910f315bcfe58c656fb39c82 /src/vnet/lisp-gpe/interface.c
parent57938f63cc6743193c76d4fa89ad3250a5f76b56 (diff)
LISP: add P-ITR/P-ETR/xTR API handlers, ONE-24
Change-Id: I25937cd7470c826d1e833e65530ae959c39139d8 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-gpe/interface.c')
-rw-r--r--src/vnet/lisp-gpe/interface.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/lisp-gpe/interface.c b/src/vnet/lisp-gpe/interface.c
index a0c05e85682..84933ec3987 100644
--- a/src/vnet/lisp-gpe/interface.c
+++ b/src/vnet/lisp-gpe/interface.c
@@ -575,7 +575,8 @@ lisp_gpe_tenant_add_default_routes (u32 table_id)
* @return number of vectors in frame.
*/
u32
-lisp_gpe_add_l3_iface (lisp_gpe_main_t * lgm, u32 vni, u32 table_id)
+lisp_gpe_add_l3_iface (lisp_gpe_main_t * lgm, u32 vni, u32 table_id,
+ u8 with_default_routes)
{
vnet_main_t *vnm = lgm->vnet_main;
tunnel_lookup_t *l3_ifaces = &lgm->l3_ifaces;
@@ -603,7 +604,8 @@ lisp_gpe_add_l3_iface (lisp_gpe_main_t * lgm, u32 vni, u32 table_id)
/* insert default routes that point to lisp-cp lookup */
lisp_gpe_iface_set_table (hi->sw_if_index, table_id);
- lisp_gpe_tenant_add_default_routes (table_id);
+ if (with_default_routes)
+ lisp_gpe_tenant_add_default_routes (table_id);
/* enable interface */
vnet_sw_interface_set_flags (vnm, hi->sw_if_index,
@@ -908,7 +910,9 @@ lisp_gpe_add_del_iface_command_fn (vlib_main_t * vm, unformat_input_t * input,
{
if (is_add)
{
- if (~0 == lisp_gpe_tenant_l3_iface_add_or_lock (vni, table_id))
+ if (~0 == lisp_gpe_tenant_l3_iface_add_or_lock (vni, table_id, 1
+ /* with_default_route */
+ ))
{
error = clib_error_return (0, "L3 interface not created");
goto done;