summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--isisd/fabricd.h2
-rw-r--r--isisd/isis_cli.c35
-rw-r--r--isisd/isis_cli.h2
-rw-r--r--isisd/isis_main.c5
-rw-r--r--isisd/isis_northbound.c37
-rw-r--r--isisd/isis_vty_common.c109
-rw-r--r--isisd/isis_vty_common.h32
-rw-r--r--isisd/isis_vty_fabricd.c67
-rw-r--r--isisd/subdir.am3
-rw-r--r--lib/log.c1
-rw-r--r--lib/zclient.h1
-rw-r--r--ospfd/ospf_packet.c8
-rw-r--r--ospfd/ospfd.c17
-rw-r--r--pimd/pim_zebra.c20
-rw-r--r--tests/lib/test_ntop.c1
-rw-r--r--tests/topotests/lib/common_config.py2
-rw-r--r--vtysh/vtysh_config.c3
-rw-r--r--yang/frr-isisd.yang6
-rw-r--r--zebra/interface.c5
-rw-r--r--zebra/zapi_msg.c1
-rw-r--r--zebra/zebra_vrf.h1
-rw-r--r--zebra/zebra_vxlan.c69
-rw-r--r--zebra/zebra_vxlan.h1
23 files changed, 261 insertions, 167 deletions
diff --git a/isisd/fabricd.h b/isisd/fabricd.h
index 315cfba3f0..6e93440f3a 100644
--- a/isisd/fabricd.h
+++ b/isisd/fabricd.h
@@ -53,4 +53,6 @@ void fabricd_update_lsp_no_flood(struct isis_lsp *lsp,
void fabricd_configure_triggered_csnp(struct isis_area *area, int delay,
bool always_send_csnp);
void fabricd_init(void);
+void isis_vty_daemon_init(void);
+
#endif
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 0334b98a12..4b43260773 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -333,6 +333,40 @@ void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
}
/*
+ * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring
+ */
+DEFPY(isis_bfd,
+ isis_bfd_cmd,
+ "[no] isis bfd",
+ NO_STR
+ PROTO_HELP
+ "Enable BFD support\n")
+{
+ const struct lyd_node *dnode;
+
+ dnode = yang_dnode_get(vty->candidate_config->dnode,
+ "%s/frr-isisd:isis", VTY_CURR_XPATH);
+ if (dnode == NULL) {
+ vty_out(vty, "ISIS is not enabled on this circuit\n");
+ return CMD_SUCCESS;
+ }
+
+ nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring",
+ NB_OP_MODIFY, no ? "false" : "true");
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults)
+{
+ if (!yang_dnode_get_bool(dnode, NULL))
+ vty_out(vty, " no");
+
+ vty_out(vty, "isis bfd\n");
+}
+
+/*
* XPath: /frr-isisd:isis/instance/area-address
*/
DEFPY(net, net_cmd, "[no] net WORD",
@@ -1949,6 +1983,7 @@ void isis_cli_init(void)
install_element(INTERFACE_NODE, &ip_router_isis_cmd);
install_element(INTERFACE_NODE, &ip6_router_isis_cmd);
install_element(INTERFACE_NODE, &no_ip_router_isis_cmd);
+ install_element(INTERFACE_NODE, &isis_bfd_cmd);
install_element(ISIS_NODE, &net_cmd);
diff --git a/isisd/isis_cli.h b/isisd/isis_cli.h
index 8dadf60981..6621dc0fc0 100644
--- a/isisd/isis_cli.h
+++ b/isisd/isis_cli.h
@@ -27,6 +27,8 @@ void cli_show_ip_isis_ipv4(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
+void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults);
void cli_show_isis_area_address(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_isis_is_type(struct vty *vty, struct lyd_node *dnode,
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index 48ae760173..7f49e9d89a 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -53,7 +53,6 @@
#include "isisd/isis_zebra.h"
#include "isisd/isis_te.h"
#include "isisd/isis_errors.h"
-#include "isisd/isis_vty_common.h"
#include "isisd/isis_bfd.h"
#include "isisd/isis_lsp.h"
#include "isisd/isis_mt.h"
@@ -230,7 +229,9 @@ int main(int argc, char **argv, char **envp)
prefix_list_init();
isis_init();
isis_circuit_init();
- isis_vty_init();
+#ifdef FABRICD
+ isis_vty_daemon_init();
+#endif /* FABRICD */
#ifndef FABRICD
isis_cli_init();
#endif /* ifdef FABRICD */
diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c
index ffc6ee0464..0982a468a6 100644
--- a/isisd/isis_northbound.c
+++ b/isisd/isis_northbound.c
@@ -25,6 +25,8 @@
#include "libfrr.h"
#include "linklist.h"
#include "log.h"
+#include "lib/bfd.h"
+#include "isisd/isis_bfd.h"
#include "isisd/isis_constants.h"
#include "isisd/isis_common.h"
#include "isisd/isis_flags.h"
@@ -1703,6 +1705,34 @@ static int lib_interface_isis_ipv6_routing_modify(enum nb_event event,
}
/*
+ * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring
+ */
+static int lib_interface_isis_bfd_monitoring_modify(enum nb_event event,
+ const struct lyd_node *dnode,
+ union nb_resource *resource)
+{
+ struct isis_circuit *circuit;
+ bool bfd_monitoring;
+
+ if (event != NB_EV_APPLY)
+ return NB_OK;
+
+ circuit = nb_running_get_entry(dnode, NULL, true);
+ bfd_monitoring = yang_dnode_get_bool(dnode, NULL);
+
+ if (bfd_monitoring) {
+ isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX,
+ BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT,
+ true);
+ } else {
+ isis_bfd_circuit_cmd(circuit, ZEBRA_BFD_DEST_DEREGISTER);
+ bfd_info_free(&circuit->bfd_info);
+ }
+
+ return NB_OK;
+}
+
+/*
* XPath: /frr-interface:lib/interface/frr-isisd:isis/csnp-interval/level-1
*/
static int
@@ -3212,6 +3242,13 @@ const struct frr_yang_module_info frr_isisd_info = {
},
},
{
+ .xpath = "/frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring",
+ .cbs = {
+ .modify = lib_interface_isis_bfd_monitoring_modify,
+ .cli_show = cli_show_ip_isis_bfd_monitoring,
+ }
+ },
+ {
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/csnp-interval",
.cbs = {
.cli_show = cli_show_ip_isis_csnp_interval,
diff --git a/isisd/isis_vty_common.c b/isisd/isis_vty_common.c
deleted file mode 100644
index 06432db0b2..0000000000
--- a/isisd/isis_vty_common.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * IS-IS Rout(e)ing protocol - isis_vty_common.c
- *
- * This file contains the CLI that is shared between OpenFabric and IS-IS
- *
- * Copyright (C) 2001,2002 Sampo Saaristo
- * Tampere University of Technology
- * Institute of Communications Engineering
- * Copyright (C) 2016 David Lamparter, for NetDEF, Inc.
- * Copyright (C) 2018 Christian Franke, for NetDEF, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas 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 "command.h"
-#include "bfd.h"
-
-#include "isis_circuit.h"
-#include "isis_csm.h"
-#include "isis_misc.h"
-#include "isisd.h"
-#include "isis_bfd.h"
-#include "isis_vty_common.h"
-
-struct isis_circuit *isis_circuit_lookup(struct vty *vty)
-{
- struct interface *ifp = VTY_GET_CONTEXT(interface);
- struct isis_circuit *circuit;
-
- if (!ifp) {
- vty_out(vty, "Invalid interface \n");
- return NULL;
- }
-
- circuit = circuit_scan_by_ifp(ifp);
- if (!circuit) {
- vty_out(vty, "ISIS is not enabled on circuit %s\n", ifp->name);
- return NULL;
- }
-
- return circuit;
-}
-
-DEFUN (isis_bfd,
- isis_bfd_cmd,
- PROTO_NAME " bfd",
- PROTO_HELP
- "Enable BFD support\n")
-{
- struct isis_circuit *circuit = isis_circuit_lookup(vty);
-
- if (!circuit)
- return CMD_ERR_NO_MATCH;
-
- if (circuit->bfd_info
- && CHECK_FLAG(circuit->bfd_info->flags, BFD_FLAG_PARAM_CFG)) {
- return CMD_SUCCESS;
- }
-
- isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX,
- BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT, true);
-
- return CMD_SUCCESS;
-}
-
-DEFUN (no_isis_bfd,
- no_isis_bfd_cmd,
- "no " PROTO_NAME " bfd",
- NO_STR
- PROTO_HELP
- "Disables BFD support\n"
-)
-{
- struct isis_circuit *circuit = isis_circuit_lookup(vty);
-
- if (!circuit)
- return CMD_ERR_NO_MATCH;
-
- if (!circuit->bfd_info)
- return CMD_SUCCESS;
-
- isis_bfd_circuit_cmd(circuit, ZEBRA_BFD_DEST_DEREGISTER);
- bfd_info_free(&circuit->bfd_info);
- return CMD_SUCCESS;
-}
-
-void isis_vty_init(void)
-{
- install_element(INTERFACE_NODE, &isis_bfd_cmd);
- install_element(INTERFACE_NODE, &no_isis_bfd_cmd);
-
-#ifdef FABRICD
- isis_vty_daemon_init();
-#endif /* ifdef FABRICD */
-}
diff --git a/isisd/isis_vty_common.h b/isisd/isis_vty_common.h
deleted file mode 100644
index 297da0e2c1..0000000000
--- a/isisd/isis_vty_common.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * IS-IS Rout(e)ing protocol - isis_vty_common.h
- *
- * Copyright (C) 2001,2002 Sampo Saaristo
- * Tampere University of Technology
- * Institute of Communications Engineering
- * Copyright (C) 2016 David Lamparter, for NetDEF, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas 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
- */
-
-#ifndef ISIS_VTY_COMMON_H
-#define ISIS_VTY_COMMON_H
-
-struct isis_circuit *isis_circuit_lookup(struct vty *vty);
-
-void isis_vty_daemon_init(void);
-void isis_vty_init(void);
-
-#endif
diff --git a/isisd/isis_vty_fabricd.c b/isisd/isis_vty_fabricd.c
index 431ad9712a..24e5c51947 100644
--- a/isisd/isis_vty_fabricd.c
+++ b/isisd/isis_vty_fabricd.c
@@ -23,8 +23,9 @@
#include "command.h"
+#include "lib/bfd.h"
+#include "isisd/isis_bfd.h"
#include "isisd/isisd.h"
-#include "isisd/isis_vty_common.h"
#include "isisd/fabricd.h"
#include "isisd/isis_tlvs.h"
#include "isisd/isis_misc.h"
@@ -34,6 +35,25 @@
#include "lib/spf_backoff.h"
#include "isisd/isis_mt.h"
+static struct isis_circuit *isis_circuit_lookup(struct vty *vty)
+{
+ struct interface *ifp = VTY_GET_CONTEXT(interface);
+ struct isis_circuit *circuit;
+
+ if (!ifp) {
+ vty_out(vty, "Invalid interface \n");
+ return NULL;
+ }
+
+ circuit = circuit_scan_by_ifp(ifp);
+ if (!circuit) {
+ vty_out(vty, "ISIS is not enabled on circuit %s\n", ifp->name);
+ return NULL;
+ }
+
+ return circuit;
+}
+
DEFUN (fabric_tier,
fabric_tier_cmd,
"fabric-tier (0-14)",
@@ -288,6 +308,49 @@ DEFUN (no_ip_router_isis,
return CMD_SUCCESS;
}
+DEFUN (isis_bfd,
+ isis_bfd_cmd,
+ PROTO_NAME " bfd",
+ PROTO_HELP
+ "Enable BFD support\n")
+{
+ struct isis_circuit *circuit = isis_circuit_lookup(vty);
+
+ if (!circuit)
+ return CMD_ERR_NO_MATCH;
+
+ if (circuit->bfd_info
+ && CHECK_FLAG(circuit->bfd_info->flags, BFD_FLAG_PARAM_CFG)) {
+ return CMD_SUCCESS;
+ }
+
+ isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX,
+ BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT, true);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN (no_isis_bfd,
+ no_isis_bfd_cmd,
+ "no " PROTO_NAME " bfd",
+ NO_STR
+ PROTO_HELP
+ "Disables BFD support\n"
+)
+{
+ struct isis_circuit *circuit = isis_circuit_lookup(vty);
+
+ if (!circuit)
+ return CMD_ERR_NO_MATCH;
+
+ if (!circuit->bfd_info)
+ return CMD_SUCCESS;
+
+ isis_bfd_circuit_cmd(circuit, ZEBRA_BFD_DEST_DEREGISTER);
+ bfd_info_free(&circuit->bfd_info);
+ return CMD_SUCCESS;
+}
+
DEFUN (set_overload_bit,
set_overload_bit_cmd,
"set-overload-bit",
@@ -1045,6 +1108,8 @@ void isis_vty_daemon_init(void)
install_element(INTERFACE_NODE, &ip_router_isis_cmd);
install_element(INTERFACE_NODE, &ip6_router_isis_cmd);
install_element(INTERFACE_NODE, &no_ip_router_isis_cmd);
+ install_element(INTERFACE_NODE, &isis_bfd_cmd);
+ install_element(INTERFACE_NODE, &no_isis_bfd_cmd);
install_element(ROUTER_NODE, &set_overload_bit_cmd);
install_element(ROUTER_NODE, &no_set_overload_bit_cmd);
diff --git a/isisd/subdir.am b/isisd/subdir.am
index bae56309cf..24f24022a5 100644
--- a/isisd/subdir.am
+++ b/isisd/subdir.am
@@ -11,7 +11,6 @@ vtysh_scan += \
$(top_srcdir)/isisd/isis_redist.c \
$(top_srcdir)/isisd/isis_spf.c \
$(top_srcdir)/isisd/isis_te.c \
- $(top_srcdir)/isisd/isis_vty_common.c \
$(top_srcdir)/isisd/isis_vty_fabricd.c \
$(top_srcdir)/isisd/isisd.c \
# end
@@ -51,7 +50,6 @@ noinst_HEADERS += \
isisd/isis_te.h \
isisd/isis_tlvs.h \
isisd/isis_tx_queue.h \
- isisd/isis_vty_common.h \
isisd/isis_zebra.h \
isisd/isisd.h \
isisd/iso_checksum.h \
@@ -82,7 +80,6 @@ LIBISIS_SOURCES = \
isisd/isis_te.c \
isisd/isis_tlvs.c \
isisd/isis_tx_queue.c \
- isisd/isis_vty_common.c \
isisd/isis_zebra.c \
isisd/isisd.c \
isisd/iso_checksum.c \
diff --git a/lib/log.c b/lib/log.c
index 732b238b1e..48ee0f6adb 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -1122,6 +1122,7 @@ static const struct zebra_desc_table command_types[] = {
DESC_ENTRY(ZEBRA_VXLAN_FLOOD_CONTROL),
DESC_ENTRY(ZEBRA_VXLAN_SG_ADD),
DESC_ENTRY(ZEBRA_VXLAN_SG_DEL),
+ DESC_ENTRY(ZEBRA_VXLAN_SG_REPLAY),
};
#undef DESC_ENTRY
diff --git a/lib/zclient.h b/lib/zclient.h
index be2ef69dc1..81e454d192 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -176,6 +176,7 @@ typedef enum {
ZEBRA_VXLAN_FLOOD_CONTROL,
ZEBRA_VXLAN_SG_ADD,
ZEBRA_VXLAN_SG_DEL,
+ ZEBRA_VXLAN_SG_REPLAY,
} zebra_message_types_t;
struct redist_proto {
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 6bc8c25153..50c30a6fa0 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -660,6 +660,14 @@ static int ospf_write(struct thread *thread)
struct in_pktinfo *pi;
#endif
+ if (ospf->fd < 0 || ospf->oi_running == 0) {
+ if (IS_DEBUG_OSPF_EVENT)
+ zlog_debug(
+ "ospf_write failed to send, fd %d, instance %u"
+ ,ospf->fd, ospf->oi_running);
+ return -1;
+ }
+
ospf->t_write = NULL;
node = listhead(ospf->oi_write_q);
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index aa38a42714..a64ddbc3b7 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -656,6 +656,7 @@ static void ospf_finish_final(struct ospf *ospf)
for (ALL_LIST_ELEMENTS(ospf->oiflist, node, nnode, oi))
ospf_if_free(oi);
list_delete(&ospf->oiflist);
+ ospf->oi_running = 0;
/* De-Register VRF */
ospf_zebra_vrf_deregister(ospf);
@@ -699,6 +700,8 @@ static void ospf_finish_final(struct ospf *ospf)
}
/* Cancel all timers. */
+ OSPF_TIMER_OFF(ospf->t_read);
+ OSPF_TIMER_OFF(ospf->t_write);
OSPF_TIMER_OFF(ospf->t_external_lsa);
OSPF_TIMER_OFF(ospf->t_spf_calc);
OSPF_TIMER_OFF(ospf->t_ase_calc);
@@ -708,14 +711,9 @@ static void ospf_finish_final(struct ospf *ospf)
OSPF_TIMER_OFF(ospf->t_asbr_check);
OSPF_TIMER_OFF(ospf->t_distribute_update);
OSPF_TIMER_OFF(ospf->t_lsa_refresher);
- OSPF_TIMER_OFF(ospf->t_read);
- OSPF_TIMER_OFF(ospf->t_write);
OSPF_TIMER_OFF(ospf->t_opaque_lsa_self);
OSPF_TIMER_OFF(ospf->t_sr_update);
- close(ospf->fd);
- stream_free(ospf->ibuf);
-
LSDB_LOOP (OPAQUE_AS_LSDB(ospf), rn, lsa)
ospf_discard_from_db(ospf, ospf->lsdb, lsa);
LSDB_LOOP (EXTERNAL_LSDB(ospf), rn, lsa)
@@ -755,9 +753,6 @@ static void ospf_finish_final(struct ospf *ospf)
ospf_ase_external_lsas_finish(ospf->external_lsas);
}
- list_delete(&ospf->areas);
- list_delete(&ospf->oi_write_q);
-
for (i = ZEBRA_ROUTE_SYSTEM; i <= ZEBRA_ROUTE_MAX; i++) {
struct list *ext_list;
struct ospf_external *ext;
@@ -789,6 +784,12 @@ static void ospf_finish_final(struct ospf *ospf)
if (!CHECK_FLAG(om->options, OSPF_MASTER_SHUTDOWN))
instance = ospf->instance;
+ list_delete(&ospf->areas);
+ list_delete(&ospf->oi_write_q);
+
+ close(ospf->fd);
+ stream_free(ospf->ibuf);
+ ospf->fd = -1;
ospf_delete(ospf);
if (ospf->name) {
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 2c814d0fdc..675e81f5a1 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -580,6 +580,23 @@ static int pim_zebra_vxlan_sg_proc(ZAPI_CALLBACK_ARGS)
return 0;
}
+static void pim_zebra_vxlan_replay(void)
+{
+ struct stream *s = NULL;
+
+ /* Check socket. */
+ if (!zclient || zclient->sock < 0)
+ return;
+
+ s = zclient->obuf;
+ stream_reset(s);
+
+ zclient_create_header(s, ZEBRA_VXLAN_SG_REPLAY, VRF_DEFAULT);
+ stream_putw_at(s, 0, stream_get_endp(s));
+
+ zclient_send_message(zclient);
+}
+
void pim_scan_individual_oil(struct channel_oil *c_oil, int in_vif_index)
{
struct in_addr vif_source;
@@ -783,6 +800,9 @@ static void pim_zebra_connected(struct zclient *zclient)
bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER, router->vrf_id);
zclient_send_reg_requests(zclient, router->vrf_id);
+
+ /* request for VxLAN BUM group addresses */
+ pim_zebra_vxlan_replay();
}
static void pim_zebra_capabilities(struct zclient_capabilities *cap)
diff --git a/tests/lib/test_ntop.c b/tests/lib/test_ntop.c
index 1806059963..0a55ecddb8 100644
--- a/tests/lib/test_ntop.c
+++ b/tests/lib/test_ntop.c
@@ -81,7 +81,6 @@ int main(int argc, char **argv)
assert(inet_pton(AF_INET6, buf1, &i6check));
assert(!memcmp(&i6, &i6check, sizeof(i6)));
- assert(strlen(buf1) <= strlen(buf2));
}
return 0;
}
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index d2c1d82430..628c198e1a 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -1157,7 +1157,7 @@ def verify_rib(tgen, addr_type, dut, input_dict, next_hop=None, protocol=None):
else:
command = "show ipv6 route json"
- sleep(2)
+ sleep(10)
logger.info("Checking router %s RIB:", router)
rib_routes_json = rnode.vtysh_cmd(command, isjson=True)
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 4ae1e499ff..1e45e6f972 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -265,7 +265,8 @@ void vtysh_config_parse_line(void *arg, const char *line)
|| config->index == INTERFACE_NODE
|| config->index == LOGICALROUTER_NODE
|| config->index == VTY_NODE
- || config->index == VRF_NODE)
+ || config->index == VRF_NODE
+ || config->index == NH_GROUP_NODE)
config_add_line_uniq(config->line, line);
else
config_add_line(config->line, line);
diff --git a/yang/frr-isisd.yang b/yang/frr-isisd.yang
index 7b132cb61e..05a896a1db 100644
--- a/yang/frr-isisd.yang
+++ b/yang/frr-isisd.yang
@@ -756,6 +756,12 @@ module frr-isisd {
"IS-type of this circuit.";
}
+ leaf bfd-monitoring {
+ type boolean;
+ default false;
+ description "Monitor IS-IS peers on this circuit.";
+ }
+
container csnp-interval {
description
"Complete Sequence Number PDU (CSNP) generation interval.";
diff --git a/zebra/interface.c b/zebra/interface.c
index 719cf05db1..4eec435f1c 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -69,6 +69,7 @@ static int if_zebra_speed_update(struct thread *thread)
struct interface *ifp = THREAD_ARG(thread);
struct zebra_if *zif = ifp->info;
uint32_t new_speed;
+ bool changed = false;
zif->speed_update = NULL;
@@ -79,8 +80,12 @@ static int if_zebra_speed_update(struct thread *thread)
new_speed);
ifp->speed = new_speed;
if_add_update(ifp);
+ changed = true;
}
+ if (changed || new_speed == UINT32_MAX)
+ thread_add_timer(zrouter.master, if_zebra_speed_update, ifp, 5,
+ &zif->speed_update);
return 1;
}
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 007e554929..98bb2eda60 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -2491,6 +2491,7 @@ void (*zserv_handlers[])(ZAPI_HANDLER_ARGS) = {
[ZEBRA_IPTABLE_ADD] = zread_iptable,
[ZEBRA_IPTABLE_DELETE] = zread_iptable,
[ZEBRA_VXLAN_FLOOD_CONTROL] = zebra_vxlan_flood_control,
+ [ZEBRA_VXLAN_SG_REPLAY] = zebra_vxlan_sg_replay,
};
#if defined(HANDLE_ZAPI_FUZZING)
diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h
index 972fe381cc..f92e1a010b 100644
--- a/zebra/zebra_vrf.h
+++ b/zebra/zebra_vrf.h
@@ -69,6 +69,7 @@ struct zebra_vrf {
/* Flags. */
uint16_t flags;
#define ZEBRA_VRF_RETAIN (1 << 0)
+#define ZEBRA_PIM_SEND_VXLAN_SG (1 << 1)
uint32_t table_id;
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index d551fa8842..dff50ceef4 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -9481,8 +9481,9 @@ static int zebra_vxlan_dad_mac_auto_recovery_exp(struct thread *t)
/************************** vxlan SG cache management ************************/
/* Inform PIM about the mcast group */
-static int zebra_vxlan_sg_send(struct prefix_sg *sg,
- char *sg_str, uint16_t cmd)
+static int zebra_vxlan_sg_send(struct zebra_vrf *zvrf,
+ struct prefix_sg *sg,
+ char *sg_str, uint16_t cmd)
{
struct zserv *client = NULL;
struct stream *s = NULL;
@@ -9491,6 +9492,9 @@ static int zebra_vxlan_sg_send(struct prefix_sg *sg,
if (!client)
return 0;
+ if (!CHECK_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG))
+ return 0;
+
s = stream_new(ZEBRA_MAX_PACKET_SIZ);
zclient_create_header(s, cmd, VRF_DEFAULT);
@@ -9590,7 +9594,8 @@ static zebra_vxlan_sg_t *zebra_vxlan_sg_add(struct zebra_vrf *zvrf,
return vxlan_sg;
}
- zebra_vxlan_sg_send(sg, vxlan_sg->sg_str, ZEBRA_VXLAN_SG_ADD);
+ zebra_vxlan_sg_send(zvrf, sg, vxlan_sg->sg_str,
+ ZEBRA_VXLAN_SG_ADD);
return vxlan_sg;
}
@@ -9612,8 +9617,8 @@ static void zebra_vxlan_sg_del(zebra_vxlan_sg_t *vxlan_sg)
zebra_vxlan_sg_do_deref(zvrf, sip, vxlan_sg->sg.grp);
}
- zebra_vxlan_sg_send(&vxlan_sg->sg, vxlan_sg->sg_str,
- ZEBRA_VXLAN_SG_DEL);
+ zebra_vxlan_sg_send(zvrf, &vxlan_sg->sg,
+ vxlan_sg->sg_str, ZEBRA_VXLAN_SG_DEL);
hash_release(vxlan_sg->zvrf->vxlan_sg_table, vxlan_sg);
@@ -9697,6 +9702,31 @@ static void zebra_vxlan_sg_cleanup(struct hash_backet *backet, void *arg)
zebra_vxlan_sg_del(vxlan_sg);
}
+static void zebra_vxlan_sg_replay_send(struct hash_backet *backet, void *arg)
+{
+ zebra_vxlan_sg_t *vxlan_sg = (zebra_vxlan_sg_t *)backet->data;
+
+ zebra_vxlan_sg_send(vxlan_sg->zvrf, &vxlan_sg->sg,
+ vxlan_sg->sg_str, ZEBRA_VXLAN_SG_ADD);
+}
+
+/* Handle message from client to replay vxlan SG entries */
+void zebra_vxlan_sg_replay(ZAPI_HANDLER_ARGS)
+{
+ if (IS_ZEBRA_DEBUG_VXLAN)
+ zlog_debug("VxLAN SG updates to PIM, start");
+
+ SET_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG);
+
+ if (!EVPN_ENABLED(zvrf)) {
+ zlog_debug("VxLAN SG replay request on unexpected vrf %d",
+ zvrf->vrf->vrf_id);
+ return;
+ }
+
+ hash_iterate(zvrf->vxlan_sg_table, zebra_vxlan_sg_replay_send, NULL);
+}
+
/************************** EVPN BGP config management ************************/
/* Notify Local MACs to the clienti, skips GW MAC */
static void zvni_send_mac_hash_entry_to_client(struct hash_bucket *bucket,
@@ -9804,14 +9834,11 @@ static void zebra_evpn_vrf_cfg_cleanup(struct zebra_vrf *zvrf)
}
/* Cleanup BGP EVPN configuration upon client disconnect */
-static int zebra_evpn_cfg_clean_up(struct zserv *client)
+static int zebra_evpn_bgp_cfg_clean_up(struct zserv *client)
{
struct vrf *vrf;
struct zebra_vrf *zvrf;
- if (client->proto != ZEBRA_ROUTE_BGP)
- return 0;
-
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) {
zvrf = vrf->info;
if (zvrf)
@@ -9821,6 +9848,30 @@ static int zebra_evpn_cfg_clean_up(struct zserv *client)
return 0;
}
+static int zebra_evpn_pim_cfg_clean_up(struct zserv *client)
+{
+ struct zebra_vrf *zvrf = zebra_vrf_get_evpn();
+
+ if (CHECK_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG)) {
+ if (IS_ZEBRA_DEBUG_VXLAN)
+ zlog_debug("VxLAN SG updates to PIM, stop");
+ UNSET_FLAG(zvrf->flags, ZEBRA_PIM_SEND_VXLAN_SG);
+ }
+
+ return 0;
+}
+
+static int zebra_evpn_cfg_clean_up(struct zserv *client)
+{
+ if (client->proto == ZEBRA_ROUTE_BGP)
+ return zebra_evpn_bgp_cfg_clean_up(client);
+
+ if (client->proto == ZEBRA_ROUTE_PIM)
+ return zebra_evpn_pim_cfg_clean_up(client);
+
+ return 0;
+}
+
/* Cleanup BGP EVPN configuration upon client disconnect */
extern void zebra_evpn_init(void)
{
diff --git a/zebra/zebra_vxlan.h b/zebra/zebra_vxlan.h
index 6117567bc1..c71953d6bb 100644
--- a/zebra/zebra_vxlan.h
+++ b/zebra/zebra_vxlan.h
@@ -79,6 +79,7 @@ extern void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS);
extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
extern void zebra_vxlan_dup_addr_detection(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_sg_replay(ZAPI_HANDLER_ARGS);
extern int is_l3vni_for_prefix_routes_only(vni_t vni);
extern ifindex_t get_l3vni_svi_ifindex(vrf_id_t vrf_id);