diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-11 19:17:45 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-31 15:20:46 +0100 |
commit | e96ba9daeb033e7677b16c9be6a89eef4f7db4b7 (patch) | |
tree | 6689a20744a3ee5e42eba4f31c114a6475594ef5 /zebra/zebra_mlag.c | |
parent | zebra: Remove `struct zebra_t` (diff) | |
download | frr-e96ba9daeb033e7677b16c9be6a89eef4f7db4b7.tar.xz frr-e96ba9daeb033e7677b16c9be6a89eef4f7db4b7.zip |
zebra: Add mlag information to zrouter
Since this is zebra router global level information
store mlag data in the zrouter structure.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mlag.c')
-rw-r--r-- | zebra/zebra_mlag.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c index 35be07c02..a510f2f8d 100644 --- a/zebra/zebra_mlag.c +++ b/zebra/zebra_mlag.c @@ -25,16 +25,15 @@ #include "hook.h" #include "zebra/zebra_mlag.h" +#include "zebra/zebra_router.h" #ifndef VTYSH_EXTRACT_PL #include "zebra/zebra_mlag_clippy.c" #endif -enum mlag_role role = MLAG_ROLE_NONE; - enum mlag_role zebra_mlag_get_role(void) { - return role; + return zrouter.mlag_info.role; } DEFUN_HIDDEN (show_mlag, @@ -47,7 +46,7 @@ DEFUN_HIDDEN (show_mlag, char buf[80]; vty_out(vty, "MLag is configured to: %s\n", - mlag_role2str(role, buf, sizeof(buf))); + mlag_role2str(zrouter.mlag_info.role, buf, sizeof(buf))); return CMD_SUCCESS; } @@ -63,11 +62,11 @@ DEFPY_HIDDEN (test_mlag, "Mlag is setup to be the secondary\n") { if (none) - role = MLAG_ROLE_NONE; + zrouter.mlag_info.role = MLAG_ROLE_NONE; if (primary) - role = MLAG_ROLE_PRIMARY; + zrouter.mlag_info.role = MLAG_ROLE_PRIMARY; if (secondary) - role = MLAG_ROLE_SECONDARY; + zrouter.mlag_info.role = MLAG_ROLE_SECONDARY; return CMD_SUCCESS; } |