diff options
author | vivek <vivek@cumulusnetworks.com> | 2016-04-16 04:19:37 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-23 15:30:56 +0200 |
commit | 40c7bdb0c9ba746d1f1bdfe1cb4d03aa5f407661 (patch) | |
tree | deeff1f385d86818d5f85258074960cdd2827508 /zebra/zebra_rib.c | |
parent | Quagga: Fix alignment in netlink messages in some cases (diff) | |
download | frr-40c7bdb0c9ba746d1f1bdfe1cb4d03aa5f407661.tar.xz frr-40c7bdb0c9ba746d1f1bdfe1cb4d03aa5f407661.zip |
Quagga: Install label forwarding entries for statically configured LSPs
Install the statically configured LSPs into the FIB (kernel). This is done
using the new attributes and definitions for MPLS in the kernel -
RTA_VIA, RTA_NEWDST and AF_MPLS.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4804
Reviewed By: CCR-3088
Testing Done: Manual in SE-1
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r-- | zebra/zebra_rib.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e238f8e8e..910610fc6 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -37,6 +37,7 @@ #include "routemap.h" #include "nexthop.h" #include "vrf.h" +#include "mpls.h" #include "zebra/rib.h" #include "zebra/rt.h" @@ -117,6 +118,19 @@ _rnode_zlog(const char *_func, vrf_id_t vrf_id, struct route_node *rn, int prior #define rnode_info(node, ...) \ _rnode_zlog(__func__, vrf_id, node, LOG_INFO, __VA_ARGS__) +u_char +route_distance (int type) +{ + u_char distance; + + if ((unsigned)type >= array_size(route_info)) + distance = 150; + else + distance = route_info[type].distance; + + return distance; +} + int is_zebra_valid_kernel_table(u_int32_t table_id) { @@ -3123,6 +3137,9 @@ rib_close (void) if (zvrf->other_table[AFI_IP6][table_id]) rib_close_table (zvrf->other_table[AFI_IP6][table_id]); } + + zebra_mpls_close_tables(zvrf); + } /* Routing information base initialize. */ |