Zebra: Add onlink attribute even for recursive routes

When a route is resolved recursively, and the recursively resolved nexthop
has the onlink attribute, the route is not programmed with the nexthop with
the onlink attribute. This patch addresses that.
This commit is contained in:
Donald Sharp 2015-05-19 18:04:10 -07:00
parent 8fe8a7f6fb
commit f44f6668ea

View File

@ -627,6 +627,8 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
{
resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
resolved_hop->ifindex = newhop->ifindex;
if (newhop->flags & NEXTHOP_FLAG_ONLINK)
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
}
}
@ -677,6 +679,8 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
{
resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
resolved_hop->ifindex = newhop->ifindex;
if (newhop->flags & NEXTHOP_FLAG_ONLINK)
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
}
}