diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2017-08-14 19:15:36 +0200 |
---|---|---|
committer | Filip Tehlar <ftehlar@cisco.com> | 2017-09-04 12:13:55 +0200 |
commit | 809bc74b5b73634678e6f1444344fd1c0a89e877 (patch) | |
tree | b21cbb276341223fbbd9b00d23488309bd47840e /src/vnet/lisp-cp/lisp_cli.c | |
parent | dbfa574a1d5ebb68a81fed20dcd4bb2f47c47066 (diff) |
LISP: re-fetch mapping before it expires
Change-Id: I0581a1bddad55d8d573c546ec84b0b2760abab3d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/lisp_cli.c')
-rw-r--r-- | src/vnet/lisp-cp/lisp_cli.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vnet/lisp-cp/lisp_cli.c b/src/vnet/lisp-cp/lisp_cli.c index 05df9fb6d2a..509046019ec 100644 --- a/src/vnet/lisp-cp/lisp_cli.c +++ b/src/vnet/lisp-cp/lisp_cli.c @@ -394,8 +394,19 @@ lisp_add_del_remote_mapping_command_fn (vlib_main_t * vm, /* add as static remote mapping, i.e., not authoritative and infinite * ttl */ - rv = vnet_lisp_add_del_mapping (&eid, rlocs, action, 0, ~0, is_add, - 1 /* is_static */ , 0); + if (is_add) + { + vnet_lisp_add_del_mapping_args_t _map_args, *map_args = &_map_args; + memset (map_args, 0, sizeof (map_args[0])); + gid_address_copy (&map_args->eid, &eid); + map_args->action = action; + map_args->is_static = 1; + map_args->authoritative = 0; + map_args->ttl = ~0; + rv = vnet_lisp_add_mapping (map_args, rlocs, NULL, NULL); + } + else + rv = vnet_lisp_del_mapping (&eid, NULL); if (rv) clib_warning ("failed to %s remote mapping!", is_add ? "add" : "delete"); |