summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-02-15 12:33:06 -0500
committerStephen Worley <sworley@nvidia.com>2022-03-09 18:02:44 -0500
commit321c80d6b2142a769059df5b9fed0f251409ed92 (patch)
tree7e42aa21179442489078ca774d4534e6acd3cf10 /zebra/interface.c
parentab465d24bd864c7ab9f5841af89c108e03e768ac (diff)
zebra: extern setting protodown reason directly
Extern the api for setting the protodown reason code bitfield directly. Some places may want to completely update the bitfield with more than one reason at a time. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 167f1b4587..a547230d37 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -63,8 +63,6 @@ DEFINE_HOOK(zebra_if_config_wr, (struct vty * vty, struct interface *ifp),
static void if_down_del_nbr_connected(struct interface *ifp);
-static int zebra_if_update_protodown(struct interface *ifp, bool new_down,
- uint32_t new_protodown_rc);
static void if_zebra_speed_update(struct thread *thread)
{
@@ -266,9 +264,9 @@ static int if_zebra_delete_hook(struct interface *ifp)
/* If we set protodown, clear our reason now from the kernel */
if (ZEBRA_IF_IS_PROTODOWN(zebra_if) && zebra_if->protodown_rc &&
!ZEBRA_IF_IS_PROTODOWN_ONLY_EXTERNAL(zebra_if))
- zebra_if_update_protodown(ifp, true,
- (zebra_if->protodown_rc &
- ~ZEBRA_PROTODOWN_ALL));
+ zebra_if_update_protodown_rc(ifp, true,
+ (zebra_if->protodown_rc &
+ ~ZEBRA_PROTODOWN_ALL));
/* Free installed address chains tree. */
if (zebra_if->ipv4_subnets)
@@ -1294,8 +1292,8 @@ static bool if_ignore_set_protodown(const struct interface *ifp, bool new_down,
return false;
}
-static int zebra_if_update_protodown(struct interface *ifp, bool new_down,
- uint32_t new_protodown_rc)
+int zebra_if_update_protodown_rc(struct interface *ifp, bool new_down,
+ uint32_t new_protodown_rc)
{
struct zebra_if *zif;
@@ -1338,7 +1336,7 @@ int zebra_if_set_protodown(struct interface *ifp, bool new_down,
else
new_protodown_rc = zif->protodown_rc & ~new_reason;
- return zebra_if_update_protodown(ifp, new_down, new_protodown_rc);
+ return zebra_if_update_protodown_rc(ifp, new_down, new_protodown_rc);
}
/*