summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-01-25 14:44:25 -0500
committerStephen Worley <sworley@nvidia.com>2022-03-09 18:02:44 -0500
commitd89b300829ff85cc4e6b51384170f67cf5f3f6a1 (patch)
tree8f390f797ffdc7d0b62a2f7845434aaf4a2184d1 /zebra/interface.c
parent0dcd8506f2dac65bcac06f79a1660d809b329340 (diff)
zebra: use a macro for check protodown
Add a helper macro for checking if interface is protodown, typing this out is annoying. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c6
1 files changed, 3 insertions, 3 deletions
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",