aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-12-04 06:11:00 +0000
committerNeale Ranns <neale@graphiant.com>2021-03-16 12:12:23 +0000
commit976b259be2ce9725f1d6756c14ff81069634a396 (patch)
treef4117b32e9230e5c313474a158dbfa847943b99d /src/vnet/mpls
parent400ce717ac043ceec404103dbaa87dd17d92feb7 (diff)
fib: Allow the creation of new source on the API
Type: feature an client can dump the existing sources, examine their priorities, then define thier own source. Usefull if a client wants to distingusih between say, static, ospf, bgp, etc routes it has added over the API. Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I5158b4fa1ebe87381ff8707bb173217f56ea274a
Diffstat (limited to 'src/vnet/mpls')
-rw-r--r--src/vnet/mpls/mpls_api.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 25bd353c62b..97928a744d8 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -192,13 +192,11 @@ mpls_route_add_del_t_handler (vnet_main_t * vnm,
goto out;
}
- rv = fib_api_route_add_del (mp->mr_is_add,
- mp->mr_is_multipath,
- fib_index,
- &pfx,
- (mp->mr_route.mr_is_multicast ?
- FIB_ENTRY_FLAG_MULTICAST :
- FIB_ENTRY_FLAG_NONE), rpaths);
+ rv = fib_api_route_add_del (
+ mp->mr_is_add, mp->mr_is_multipath, fib_index, &pfx, FIB_SOURCE_API,
+ (mp->mr_route.mr_is_multicast ? FIB_ENTRY_FLAG_MULTICAST :
+ FIB_ENTRY_FLAG_NONE),
+ rpaths);
if (mp->mr_is_add && 0 == rv)
*stats_index = fib_table_entry_get_stats_index (fib_index, &pfx);