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.
This commit is contained in:
parent
9eace84342
commit
843b10c8b0
1 changed files with 8 additions and 0 deletions
|
@ -2115,6 +2115,7 @@ no_nexthop:
|
||||||
memset(nhp, 0, NEXTHOP_MAX_SIZE);
|
memset(nhp, 0, NEXTHOP_MAX_SIZE);
|
||||||
nhp->iface = nh->iface;
|
nhp->iface = nh->iface;
|
||||||
nhp->weight = nh->weight;
|
nhp->weight = nh->weight;
|
||||||
|
|
||||||
if (mls)
|
if (mls)
|
||||||
{
|
{
|
||||||
nhp->labels = nh->labels + mls->len;
|
nhp->labels = nh->labels + mls->len;
|
||||||
|
@ -2132,6 +2133,13 @@ no_nexthop:
|
||||||
continue;
|
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))
|
if (ipa_nonzero(nh->gw))
|
||||||
{
|
{
|
||||||
nhp->gw = nh->gw; /* Router nexthop */
|
nhp->gw = nh->gw; /* Router nexthop */
|
||||||
|
|
Loading…
Reference in a new issue