From 65d82a45ecaafa60e680434e7f27ffe50e528f9b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 7 Feb 2024 20:32:24 -0500 Subject: [PATCH] zebra: dplane_nexthop_add cannot return ZEBRA_DPLANE_REQUEST_SUCCESS When installing a NHG via dplane_nexthop_add, it can only return REQUEST_QUEUED or REQUEST_FAILURE. There is no way SUCCESS can be returned with the way the dplane works at this point in time. Remove the code that attempts to set the NHE state appropriately as it is impossible. Signed-off-by: Donald Sharp --- zebra/zebra_nhg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index dc403b8111..4e64fb8ee2 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -3101,7 +3101,7 @@ void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe) if (!ZEBRA_NHG_CREATED(nhe)) nhe->type = ZEBRA_ROUTE_NHG; - int ret = dplane_nexthop_add(nhe); + enum zebra_dplane_result ret = dplane_nexthop_add(nhe); switch (ret) { case ZEBRA_DPLANE_REQUEST_QUEUED: @@ -3114,8 +3114,9 @@ void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe) nhe); break; case ZEBRA_DPLANE_REQUEST_SUCCESS: - SET_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED); - zebra_nhg_handle_install(nhe, false); + flog_err(EC_ZEBRA_DP_INVALID_RC, + "DPlane returned an invalid result code for attempt of installation of %pNG into the kernel", + nhe); break; } } -- 2.39.5