summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/control.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-08-02 12:45:07 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-08-02 17:10:14 +0000
commit1e553a00389fb0eb2d54b950a3cfd91dd1a72644 (patch)
tree7203f85d0e4ddda6b0f79f9d40b7bbe810a8239d /src/vnet/lisp-cp/control.c
parent5780898e5be8e8c279ac469417688d5b884f0217 (diff)
LISP: make TTL for map register messages configurable
Change-Id: I38e1c6a6b033e12ef3f4345a1deff73fa4adbea0 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/control.c')
-rw-r--r--src/vnet/lisp-cp/control.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c
index fc860e14d89..a85656b3fb2 100644
--- a/src/vnet/lisp-cp/control.c
+++ b/src/vnet/lisp-cp/control.c
@@ -2075,6 +2075,21 @@ vnet_lisp_add_del_map_resolver (vnet_lisp_add_del_map_resolver_args_t * a)
}
int
+vnet_lisp_map_register_set_ttl (u32 ttl)
+{
+ lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
+ lcm->map_register_ttl = ttl;
+ return 0;
+}
+
+u32
+vnet_lisp_map_register_get_ttl (void)
+{
+ lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
+ return lcm->map_register_ttl;
+}
+
+int
vnet_lisp_add_del_mreq_itr_rlocs (vnet_lisp_add_del_mreq_itr_rloc_args_t * a)
{
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
@@ -4005,6 +4020,7 @@ lisp_cp_init (vlib_main_t * vm)
u64 now = clib_cpu_time_now ();
timing_wheel_init (&lcm->wheel, now, vm->clib_time.clocks_per_second);
lcm->nsh_map_index = ~0;
+ lcm->map_register_ttl = MAP_REGISTER_DEFAULT_TTL;
return 0;
}