summaryrefslogtreecommitdiff
path: root/zebra/zebra_mlag.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-12-18 08:01:50 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-01-04 12:21:00 -0500
commitff1fb8d5f6171ed66f00339152f3e8433a7ff65d (patch)
tree23ccfabf8dfa642ee26d878622892a34506a4939 /zebra/zebra_mlag.c
parentdf3956009145194f4025c136ded9942d9564c455 (diff)
zebra: Add a retrieve the mlag role function
Add the ability to retrieve the current role of mlag for this machine. If mlag is not setup we will always return MLAG_ROLE_NONE. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mlag.c')
-rw-r--r--zebra/zebra_mlag.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
index d1fc71a5a0..26470ed5c0 100644
--- a/zebra/zebra_mlag.c
+++ b/zebra/zebra_mlag.c
@@ -25,6 +25,13 @@
#include "zebra/zebra_mlag.h"
+enum mlag_role role = MLAG_ROLE_NONE;
+
+enum mlag_role zebra_mlag_get_role(void)
+{
+ return role;
+}
+
void zebra_mlag_init(void)
{
}