+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* PIM for Quagga
* Copyright (C) 2008 Everton da Silva Marques
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
#include <lib/lib_errors.h>
#include "pimd.h"
+#include "pim_instance.h"
#include "pim_mlag.h"
#include "pim_zebra.h"
static void pim_mlag_zebra_fill_header(enum mlag_msg_type msg_type)
{
uint32_t fill_msg_type = msg_type;
- uint16_t data_len;
+ uint16_t data_len = 0;
uint16_t msg_cnt = 1;
- if (msg_type == MLAG_MSG_NONE)
- return;
-
switch (msg_type) {
case MLAG_REGISTER:
case MLAG_DEREGISTER:
data_len = sizeof(struct mlag_mroute_del);
fill_msg_type = MLAG_MROUTE_DEL_BULK;
break;
- default:
+ case MLAG_MSG_NONE:
+ return;
+ case MLAG_STATUS_UPDATE:
+ case MLAG_DUMP:
+ case MLAG_MROUTE_ADD_BULK:
+ case MLAG_MROUTE_DEL_BULK:
+ case MLAG_PIM_CFG_DUMP:
+ case MLAG_VXLAN_UPDATE:
+ case MLAG_PEER_FRR_STATUS:
data_len = 0;
break;
}
* Thsi thread reads the clients data from the Gloabl queue and encodes with
* protobuf and pass on to the MLAG socket.
*/
-static int pim_mlag_zthread_handler(struct thread *event)
+static void pim_mlag_zthread_handler(struct thread *event)
{
struct stream *read_s;
uint32_t wr_count = 0;
__func__, wr_count);
if (wr_count == 0)
- return 0;
+ return;
for (wr_count = 0; wr_count < PIM_MLAG_POST_LIMIT; wr_count++) {
/* FIFO is empty,wait for teh message to be add */
if (wr_count >= PIM_MLAG_POST_LIMIT)
pim_mlag_signal_zpthread();
-
- return 0;
}