summaryrefslogtreecommitdiffstats
path: root/lib/nexthop.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-04-20 01:08:10 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-23 15:31:02 +0200
commitc0f4be83a11c22ff7e9920fc44ebc015d5b1f776 (patch)
treed350ca54d663f07ea59610fd0d1c5fd239194c4d /lib/nexthop.c
parentMPLS: Configure static routes with labels in Quagga (diff)
downloadfrr-c0f4be83a11c22ff7e9920fc44ebc015d5b1f776.tar.xz
frr-c0f4be83a11c22ff7e9920fc44ebc015d5b1f776.zip
MPLS: Install labeled static routes
This patch installs labeled static routes in the FIB. The routes are installed using the RTA_ENCAP (and RTA_ENCAP_TYPE) nested attributes. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-6040 Reviewed By: CCR-3091 Testing Done: Tested in SE-1, brief manual testing now
Diffstat (limited to 'lib/nexthop.c')
-rw-r--r--lib/nexthop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index 465cc9485..8e775b68b 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -129,6 +129,9 @@ copy_nexthops (struct nexthop **tnh, struct nexthop *nh)
nexthop->ifindex = nh->ifindex;
memcpy(&(nexthop->gate), &(nh->gate), sizeof(union g_addr));
memcpy(&(nexthop->src), &(nh->src), sizeof(union g_addr));
+ if (nh->nh_label)
+ nexthop_add_labels (nexthop, nh->nh_label->num_labels,
+ &nh->nh_label->label[0]);
nexthop_add(tnh, nexthop);
if (CHECK_FLAG(nh1->flags, NEXTHOP_FLAG_RECURSIVE))