]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Add a retrieve the mlag role function
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Dec 2018 13:01:50 +0000 (08:01 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 4 Jan 2019 17:21:00 +0000 (12:21 -0500)
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>
zebra/zebra_mlag.c
zebra/zebra_mlag.h

index d1fc71a5a067dde7ec25e78585e940aef7a61d3c..26470ed5c0ef67a15c9176fadb7cd485509e3c50 100644 (file)
 
 #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)
 {
 }
index 97065bb841683c2c45968937e834673a2d6495a5..c5c147c833e3d592be179ec4148d3ef70e651d63 100644 (file)
@@ -26,4 +26,6 @@
 
 void zebra_mlag_init(void);
 void zebra_mlag_terminate(void);
+
+enum mlag_role zebra_mlag_get_role(void);
 #endif