Merge pull request #3289 from donaldsharp/onlink_schmonlink

zebra: Carry onlink if set from resolving nexthop
This commit is contained in:
Jafar Al-Gharaibeh 2018-11-12 09:43:15 -06:00 committed by GitHub
commit 5c5e0c0b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -358,8 +358,6 @@ static void nexthop_set_resolved(afi_t afi, const struct nexthop *newhop,
if (newhop->ifindex) { if (newhop->ifindex) {
resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX; resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
resolved_hop->ifindex = newhop->ifindex; resolved_hop->ifindex = newhop->ifindex;
if (newhop->flags & NEXTHOP_FLAG_ONLINK)
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
} }
break; break;
case NEXTHOP_TYPE_IPV6: case NEXTHOP_TYPE_IPV6:
@ -398,6 +396,9 @@ static void nexthop_set_resolved(afi_t afi, const struct nexthop *newhop,
break; break;
} }
if (newhop->flags & NEXTHOP_FLAG_ONLINK)
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
/* Copy labels of the resolved route */ /* Copy labels of the resolved route */
if (newhop->nh_label) if (newhop->nh_label)
nexthop_add_labels(resolved_hop, newhop->nh_label_type, nexthop_add_labels(resolved_hop, newhop->nh_label_type,