diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-06-11 13:34:18 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-09-28 18:40:59 +0200 |
commit | 27805e74f02c9e0b4f0086e8727135788cf9fe2b (patch) | |
tree | f42cf0dcae66f79dafbdf61afbc348e62fe535da /zebra/zebra_dplane.c | |
parent | zebra: Only install a minimal amount of times (diff) | |
download | frr-27805e74f02c9e0b4f0086e8727135788cf9fe2b.tar.xz frr-27805e74f02c9e0b4f0086e8727135788cf9fe2b.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_dplane.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index f2725adc5..77abe8bb6 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -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; } |