diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index f26d52332b..4d6439652b 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -857,7 +857,7 @@ static void netlink_proc_dplane_if_protodown(struct zebra_if *zif, else zif->protodown_rc &= ~ZEBRA_PROTODOWN_EXTERNAL; - old_protodown = !!(zif->flags & ZIF_FLAG_PROTODOWN); + old_protodown = !!ZEBRA_IF_IS_PROTODOWN(zif); if (protodown == old_protodown) return; @@ -906,7 +906,7 @@ static void if_sweep_protodown(struct zebra_if *zif) { bool protodown; - protodown = !!(zif->flags & ZIF_FLAG_PROTODOWN); + protodown = !!ZEBRA_IF_IS_PROTODOWN(zif); if (!protodown) return; diff --git a/zebra/interface.c b/zebra/interface.c index 15f8339c08..35a2d3e83d 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1244,7 +1244,7 @@ static bool if_ignore_set_protodown(const struct interface *ifp, bool new_down, zif = ifp->info; /* Current state as we know it */ - old_down = !!(zif->flags & ZIF_FLAG_PROTODOWN); + old_down = !!(ZEBRA_IF_IS_PROTODOWN(zif)); old_set_down = !!(zif->flags & ZIF_FLAG_SET_PROTODOWN); old_unset_down = !!(zif->flags & ZIF_FLAG_UNSET_PROTODOWN); @@ -2091,7 +2091,7 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp) zebra_evpn_if_es_print(vty, NULL, zebra_if); vty_out(vty, " protodown: %s %s\n", - (zebra_if->flags & ZIF_FLAG_PROTODOWN) ? "on" : "off", + (ZEBRA_IF_IS_PROTODOWN(zebra_if)) ? "on" : "off", if_is_protodown_applicable(ifp) ? "" : "(n/a)"); if (zebra_if->protodown_rc) vty_out(vty, " protodown reasons: %s\n", @@ -2442,7 +2442,7 @@ static void if_dump_vty_json(struct vty *vty, struct interface *ifp, if (if_is_protodown_applicable(ifp)) { json_object_string_add( json_if, "protodown", - (zebra_if->flags & ZIF_FLAG_PROTODOWN) ? "on" : "off"); + (ZEBRA_IF_IS_PROTODOWN(zebra_if)) ? "on" : "off"); if (zebra_if->protodown_rc) json_object_string_add( json_if, "protodownReason", diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index f60951cac4..2d13b9b54b 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -2732,8 +2732,7 @@ int dplane_ctx_intf_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op, else if (unset_pdown) ctx->u.intf.protodown = false; else - ctx->u.intf.protodown = - !!(zif->flags & ZIF_FLAG_PROTODOWN); + ctx->u.intf.protodown = !!ZEBRA_IF_IS_PROTODOWN(zif); } dplane_ctx_ns_init(ctx, zns, (op == DPLANE_OP_INTF_UPDATE));