summaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/mfib')
-rw-r--r--src/vnet/mfib/mfib_entry.c7
-rw-r--r--src/vnet/mfib/mfib_table.c11
-rw-r--r--src/vnet/mfib/mfib_table.h15
3 files changed, 30 insertions, 3 deletions
diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c
index 51d775dd295..ac37665fb72 100644
--- a/src/vnet/mfib/mfib_entry.c
+++ b/src/vnet/mfib/mfib_entry.c
@@ -1324,9 +1324,10 @@ mfib_entry_encode (fib_node_index_t mfib_entry_index,
if (FIB_NODE_INDEX_INVALID != bsrc->mfes_pl)
{
- fib_path_list_walk(bsrc->mfes_pl,
- fib_path_encode,
- api_rpaths);
+ fib_path_list_walk_w_ext(bsrc->mfes_pl,
+ NULL,
+ fib_path_encode,
+ api_rpaths);
}
}
diff --git a/src/vnet/mfib/mfib_table.c b/src/vnet/mfib/mfib_table.c
index 8ae4a784684..68154b37ff8 100644
--- a/src/vnet/mfib/mfib_table.c
+++ b/src/vnet/mfib/mfib_table.c
@@ -490,6 +490,17 @@ mfib_table_get_index_for_sw_if_index (fib_protocol_t proto,
}
u32
+mfib_table_get_table_id (u32 fib_index,
+ fib_protocol_t proto)
+{
+ mfib_table_t *mfib_table;
+
+ mfib_table = mfib_table_get(fib_index, proto);
+
+ return ((NULL != mfib_table ? mfib_table->mft_table_id : ~0));
+}
+
+u32
mfib_table_find (fib_protocol_t proto,
u32 table_id)
{
diff --git a/src/vnet/mfib/mfib_table.h b/src/vnet/mfib/mfib_table.h
index 89f194f254e..6be4f798cd7 100644
--- a/src/vnet/mfib/mfib_table.h
+++ b/src/vnet/mfib/mfib_table.h
@@ -291,6 +291,21 @@ extern u32 mfib_table_get_index_for_sw_if_index(fib_protocol_t proto,
/**
* @brief
+ * Get the Table-ID of the FIB from protocol and index
+ *
+ * @param fib_index
+ * The FIB index
+ *
+ * @paran proto
+ * The protocol of the FIB (and thus the entries therein)
+ *
+ * @return fib_index
+ * The tableID of the FIB
+ */
+extern u32 mfib_table_get_table_id(u32 fib_index, fib_protocol_t proto);
+
+/**
+ * @brief
* Get the index of the FIB for a Table-ID. This DOES NOT create the
* FIB if it does not exist.
*