summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-02-20 17:31:57 +0100
committerFilip Tehlar <ftehlar@cisco.com>2017-02-20 17:31:57 +0100
commit38206ee73d51cef6ef8c00a9947322eea9940f83 (patch)
tree1a32018006161f6e8824acef049a8fdaed7ba27f /src/vnet/lisp-cp
parent6ca42d333b247eaee4995a7f779a43759a81909e (diff)
LISP: don't show PITR generated mapping in dump call
Change-Id: Iecba818ccf74a4d34e35d498e6f6a1d3c62419f4 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp')
-rw-r--r--src/vnet/lisp-cp/control.c1
-rw-r--r--src/vnet/lisp-cp/lisp_api.c4
-rw-r--r--src/vnet/lisp-cp/lisp_cli.c3
-rw-r--r--src/vnet/lisp-cp/lisp_types.h10
4 files changed, 15 insertions, 3 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c
index 66b560e4ab0..ac11d890618 100644
--- a/src/vnet/lisp-cp/control.c
+++ b/src/vnet/lisp-cp/control.c
@@ -1301,6 +1301,7 @@ vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add)
pool_get (lcm->mapping_pool, m);
m->locator_set_index = locator_set_index;
m->local = 1;
+ m->pitr_set = 1;
lcm->pitr_map_index = m - lcm->mapping_pool;
/* enable pitr mode */
diff --git a/src/vnet/lisp-cp/lisp_api.c b/src/vnet/lisp-cp/lisp_api.c
index 78d32e17aa6..b2b31f09738 100644
--- a/src/vnet/lisp-cp/lisp_api.c
+++ b/src/vnet/lisp-cp/lisp_api.c
@@ -752,6 +752,10 @@ send_lisp_eid_table_details (mapping_t * mapit,
return;
}
+ /* don't send PITR generated mapping */
+ if (mapit->pitr_set)
+ return;
+
gid = &mapit->eid;
ip_prefix = &gid_address_ippref (gid);
mac = gid_address_mac (gid);
diff --git a/src/vnet/lisp-cp/lisp_cli.c b/src/vnet/lisp-cp/lisp_cli.c
index 15e6acbf6ee..a2088dd34af 100644
--- a/src/vnet/lisp-cp/lisp_cli.c
+++ b/src/vnet/lisp-cp/lisp_cli.c
@@ -799,6 +799,9 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm,
/* *INDENT-OFF* */
pool_foreach (mapit, lcm->mapping_pool,
({
+ if (mapit->pitr_set)
+ continue;
+
locator_set_t * ls = pool_elt_at_index (lcm->locator_set_pool,
mapit->locator_set_index);
if (filter && !((1 == filter && ls->local) ||
diff --git a/src/vnet/lisp-cp/lisp_types.h b/src/vnet/lisp-cp/lisp_types.h
index e43f5ab030e..672835bd760 100644
--- a/src/vnet/lisp-cp/lisp_types.h
+++ b/src/vnet/lisp-cp/lisp_types.h
@@ -327,11 +327,15 @@ typedef struct
u32 ttl;
u8 action;
- u8 authoritative;
- u8 local;
+ u8 authoritative:1;
+ u8 local:1;
/* valid only for remote mappings */
- u8 is_static;
+ u8 is_static:1;
+ u8 pitr_set:1;
+ u8 rsvd:4;
+
+
u8 *key;
lisp_key_type_t key_id;
u8 timer_set;