summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-05-18 14:23:32 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-05-22 15:23:32 +0000
commit0eb874e7fd34d74edd0619674561995ddf3b20ae (patch)
tree7b116403bdc425a64e0042e2aa479a72080c9972 /src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
parentaade2c5a703b7d68fb2532e30bf84ab05e2ad152 (diff)
LISP-GPE: add dump call for VNIs in use
Change-Id: I394af7c1ac9fd0177ff5d298e4008245df54b436 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c')
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index 6d400f75489..1c34e6e4eee 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -495,6 +495,10 @@ add_ip_fwd_entry (lisp_gpe_main_t * lgm,
{
lisp_gpe_fwd_entry_mk_paths (lfe, a);
}
+ else
+ {
+ lfe->action = a->action;
+ }
create_fib_entries (lfe);
return (0);
@@ -1438,6 +1442,23 @@ lisp_gpe_fwd_entry_init (vlib_main_t * vm)
return (error);
}
+u32 *
+vnet_lisp_gpe_get_fwd_entry_vnis (void)
+{
+ lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
+ lisp_gpe_fwd_entry_t *lfe;
+ u32 *vnis = 0;
+
+ /* *INDENT-OFF* */
+ pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
+ ({
+ hash_set (vnis, lfe->key->vni, 0);
+ }));
+ /* *INDENT-ON* */
+
+ return vnis;
+}
+
lisp_api_gpe_fwd_entry_t *
vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni)
{
@@ -1453,6 +1474,8 @@ vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni)
memset (&e, 0, sizeof (e));
e.dp_table = lfe->eid_table_id;
e.vni = lfe->key->vni;
+ if (lfe->type == LISP_GPE_FWD_ENTRY_TYPE_NEGATIVE)
+ e.action = lfe->action;
e.fwd_entry_index = lfe - lgm->lisp_fwd_entry_pool;
memcpy (&e.reid, &lfe->key->rmt, sizeof (e.reid));
memcpy (&e.leid, &lfe->key->lcl, sizeof (e.leid));