diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-10 15:25:36 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-10 15:25:36 +0200 |
commit | 843b10c8b0c28ed3bea9a37b166500aabf5e930f (patch) | |
tree | b9ac258ee06c19edd14b0fa27d35f3b1628e6025 /nest/rt-table.c | |
parent | 9eace84342bc879abf371a84f8af3bd697e1c0a2 (diff) |
Nest: Handle non-MPLS on MPLS case in recursive route update
When non-MPLS recursive route resolves to MPLS underlying route,
then it should get MPLS labels from the the underlying route.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index d99953e5..0844070d 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -2115,6 +2115,7 @@ no_nexthop: memset(nhp, 0, NEXTHOP_MAX_SIZE); nhp->iface = nh->iface; nhp->weight = nh->weight; + if (mls) { nhp->labels = nh->labels + mls->len; @@ -2132,6 +2133,13 @@ no_nexthop: continue; } } + else if (nh->labels) + { + nhp->labels = nh->labels; + nhp->labels_orig = 0; + memcpy(nhp->label, nh->label, nh->labels * sizeof(u32)); + } + if (ipa_nonzero(nh->gw)) { nhp->gw = nh->gw; /* Router nexthop */ |