diff options
author | Neale Ranns <nranns@cisco.com> | 2016-11-02 14:20:04 +0000 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-12-02 11:09:36 +0000 |
commit | ad422ed7eaafe993d5b530395cb11a708f2ed922 (patch) | |
tree | 6122391863894f619d13037581f8365ca3796f8f /vnet/vnet/fib/fib_entry_src_rr.c | |
parent | caffe0980adc852e6f6afaa2723bd5dd14658de3 (diff) |
MPLS infrastructure improvments
- deprecate MPLSoEth and MPLSoGRE; replace with generic MPLS tunnel.
- deprecates CLI 'mpls encap ..'; replace with addition of MPLS out label to a route/tunnel.
- support for MPLS 'routes', e.g. MPLS x-connects.
- deprecates CLI 'mpls decap ..'; replace with 'mpls route .. '
Change-Id: Ibda46544912f880d0200f22bf9ff9b52828fcc2f
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet/vnet/fib/fib_entry_src_rr.c')
-rw-r--r-- | vnet/vnet/fib/fib_entry_src_rr.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/vnet/vnet/fib/fib_entry_src_rr.c b/vnet/vnet/fib/fib_entry_src_rr.c index 6d56541dec2..ff15c54e281 100644 --- a/vnet/vnet/fib/fib_entry_src_rr.c +++ b/vnet/vnet/fib/fib_entry_src_rr.c @@ -58,6 +58,7 @@ fib_entry_src_rr_resolve_via_connected (fib_entry_src_t *src, vec_free(paths); } + /** * Source initialisation Function */ @@ -79,8 +80,18 @@ fib_entry_src_rr_activate (fib_entry_src_t *src, /* * find the covering prefix. become a dependent thereof. - * there should always be a cover, though it may be the default route. + * for IP there should always be a cover, though it may be the default route. + * For MPLS there is never a cover. */ + if (FIB_PROTOCOL_MPLS == fib_entry->fe_prefix.fp_proto) + { + src->fes_pl = fib_path_list_create_special(FIB_PROTOCOL_MPLS, + FIB_PATH_LIST_FLAG_DROP, + NULL); + fib_path_list_lock(src->fes_pl); + return (!0); + } + src->rr.fesr_cover = fib_table_get_less_specific(fib_entry->fe_fib_index, &fib_entry->fe_prefix); @@ -157,12 +168,12 @@ fib_entry_src_rr_deactivate (fib_entry_src_t *src, /* * remove the depednecy on the covering entry */ - ASSERT(FIB_NODE_INDEX_INVALID != src->rr.fesr_cover); - cover = fib_entry_get(src->rr.fesr_cover); - - fib_entry_cover_untrack(cover, src->rr.fesr_sibling); - - src->rr.fesr_cover = FIB_NODE_INDEX_INVALID; + if (FIB_NODE_INDEX_INVALID != src->rr.fesr_cover) + { + cover = fib_entry_get(src->rr.fesr_cover); + fib_entry_cover_untrack(cover, src->rr.fesr_sibling); + src->rr.fesr_cover = FIB_NODE_INDEX_INVALID; + } fib_path_list_unlock(src->fes_pl); src->fes_pl = FIB_NODE_INDEX_INVALID; |