zserv_send_message(client, s);
}
+void zsend_capabilities_all_clients(void)
+{
+ struct listnode *node, *nnode;
+ struct zebra_vrf *zvrf;
+ struct zserv *client;
+
+ zvrf = vrf_info_lookup(VRF_DEFAULT);
+ for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) {
+ zsend_capabilities(client, zvrf);
+ }
+}
+
/* Tie up route-type and client->sock */
static void zread_hello(ZAPI_HANDLER_ARGS)
{
enum zapi_iptable_notify_owner note);
extern void zserv_nexthop_num_warn(const char *caller, const struct prefix *p,
const unsigned int nexthop_num);
+
+extern void zsend_capabilities_all_clients(void);
#include "zebra/zebra_mlag.h"
#include "zebra/zebra_router.h"
+#include "zebra/zapi_msg.h"
+#include "zebra/debug.h"
#ifndef VTYSH_EXTRACT_PL
#include "zebra/zebra_mlag_clippy.c"
"Mlag is setup to be primary\n"
"Mlag is setup to be the secondary\n")
{
+ enum mlag_role orig = zrouter.mlag_info.role;
+ char buf1[80], buf2[80];
+
if (none)
zrouter.mlag_info.role = MLAG_ROLE_NONE;
if (primary)
if (secondary)
zrouter.mlag_info.role = MLAG_ROLE_SECONDARY;
+ if (IS_ZEBRA_DEBUG_MLAG)
+ zlog_debug("Test: Changing role from %s to %s",
+ mlag_role2str(orig, buf1, sizeof(buf1)),
+ mlag_role2str(orig, buf2, sizeof(buf2)));
+
+ if (orig != zrouter.mlag_info.role)
+ zsend_capabilities_all_clients();
+
return CMD_SUCCESS;
}