zebra: Properly set NEXTHOP_FLAG_FIB when skipping install

When the dataplane detects that we have no need to
reinstall the same route, setup the NEXTHOP_FLAG_FIB
appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2020-06-11 07:34:18 -04:00 committed by Stephen Worley
parent e3b9c0f2f6
commit 27805e74f0

View File

@ -2368,11 +2368,25 @@ dplane_route_update_internal(struct route_node *rn,
if ((dplane_ctx_get_type(ctx) == dplane_ctx_get_old_type(ctx))
&& (dplane_ctx_get_nhe_id(ctx)
== dplane_ctx_get_old_nhe_id(ctx))) {
struct nexthop *nexthop;
if (IS_ZEBRA_DEBUG_DPLANE)
zlog_debug(
"%s: Ignoring Route exactly the same",
__func__);
for (ALL_NEXTHOPS_PTR(dplane_ctx_get_ng(ctx),
nexthop)) {
if (CHECK_FLAG(nexthop->flags,
NEXTHOP_FLAG_RECURSIVE))
continue;
if (CHECK_FLAG(nexthop->flags,
NEXTHOP_FLAG_ACTIVE))
SET_FLAG(nexthop->flags,
NEXTHOP_FLAG_FIB);
}
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}