summaryrefslogtreecommitdiff
path: root/zebra/if_netlink.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-01-19 14:36:10 -0500
committerStephen Worley <sworley@nvidia.com>2022-03-09 17:52:44 -0500
commitc40e1b1cfbbf8db7b03f9faa51afbea8cda722c3 (patch)
treee0bc54da822f99c55cca5723d5203920a751f6f5 /zebra/if_netlink.c
parentf9a1140c9a512972bd9d2ebe1d650f29e93b7328 (diff)
zebra: add command for setting protodown bit
Add command for use to set protodown via frr.conf in the case our default conflicts with another application they are using. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/if_netlink.c')
-rw-r--r--zebra/if_netlink.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 748f239db9..71a26c8d57 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -2214,4 +2214,34 @@ void interface_list(struct zebra_ns *zns)
interface_addr_lookup_netlink(zns);
}
+void if_netlink_set_frr_protodown_r_bit(uint8_t bit)
+{
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug("FRR protodown reason bit change %u -> %u",
+ frr_protodown_r_bit, bit);
+
+ frr_protodown_r_bit = bit;
+}
+
+void if_netlink_unset_frr_protodown_r_bit(void)
+{
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug("FRR protodown reason bit change %u -> %u",
+ frr_protodown_r_bit,
+ FRR_PROTODOWN_REASON_DEFAULT_BIT);
+
+ frr_protodown_r_bit = FRR_PROTODOWN_REASON_DEFAULT_BIT;
+}
+
+
+bool if_netlink_frr_protodown_r_bit_is_set(void)
+{
+ return (frr_protodown_r_bit != FRR_PROTODOWN_REASON_DEFAULT_BIT);
+}
+
+uint8_t if_netlink_get_frr_protodown_r_bit(void)
+{
+ return frr_protodown_r_bit;
+}
+
#endif /* GNU_LINUX */