From 00d57e6dd546c4d901d64d4efd8d48fda0f36316 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Tue, 15 Feb 2022 17:51:36 -0500 Subject: [PATCH] zebra: clear dplane flags on failure for protodown Make sure we clear our dplane flags for SET/UNSET on failure so that we try again. Signed-off-by: Stephen Worley --- zebra/interface.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/zebra/interface.c b/zebra/interface.c index 97741bd404..10cc665752 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1446,17 +1446,19 @@ static void zebra_if_update_ctx(struct zebra_dplane_ctx *ctx, if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug("%s: if %s(%u) dplane update failed", __func__, ifp->name, ifp->ifindex); - return; + goto done; } /* Update our info */ - if (down) { + if (down) zif->flags |= ZIF_FLAG_PROTODOWN; - zif->flags &= ~ZIF_FLAG_SET_PROTODOWN; - } else { + else zif->flags &= ~ZIF_FLAG_PROTODOWN; - zif->flags &= ~ZIF_FLAG_UNSET_PROTODOWN; - } + +done: + /* Clear our dplane flags */ + zif->flags &= ~ZIF_FLAG_SET_PROTODOWN; + zif->flags &= ~ZIF_FLAG_UNSET_PROTODOWN; } /*