diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-11-07 11:26:24 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-11-07 11:28:01 -0500 |
| commit | effcfaeb3d7f1590bc395f3d7d12232f324e527b (patch) | |
| tree | 68cad658c40e442d1b564f1c0cfe8263bba57ec6 /zebra/zebra_rib.c | |
| parent | 8dfa7e4680c3d8f2606d7fdef77df0e9cb44c645 (diff) | |
zebra: Carry onlink if set from resolving nexthop
When resolving a nexthop, carry the onlink flag if it
is set to the new nexthop.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index d55467c727..8285392527 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -358,8 +358,6 @@ static void nexthop_set_resolved(afi_t afi, const struct nexthop *newhop, if (newhop->ifindex) { resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX; resolved_hop->ifindex = newhop->ifindex; - if (newhop->flags & NEXTHOP_FLAG_ONLINK) - resolved_hop->flags |= NEXTHOP_FLAG_ONLINK; } break; case NEXTHOP_TYPE_IPV6: @@ -398,6 +396,9 @@ static void nexthop_set_resolved(afi_t afi, const struct nexthop *newhop, break; } + if (newhop->flags & NEXTHOP_FLAG_ONLINK) + resolved_hop->flags |= NEXTHOP_FLAG_ONLINK; + /* Copy labels of the resolved route */ if (newhop->nh_label) nexthop_add_labels(resolved_hop, newhop->nh_label_type, |
