summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_dump.c3
-rw-r--r--bgpd/bgp_route.c59
-rw-r--r--bgpd/bgp_route.h1
-rw-r--r--bgpd/bgp_zebra.c7
-rw-r--r--bgpd/bgpd.c17
-rw-r--r--doc/user/basic.rst4
-rw-r--r--lib/prefix.c2
-rw-r--r--lib/prefix.h5
-rw-r--r--mgmtd/mgmt_vty.c.safe506
-rw-r--r--tests/topotests/all_protocol_startup/r1/ospf6d.conf-pre-v48
-rw-r--r--tests/topotests/bfd_topo3/r5/bfdd.conf6
-rw-r--r--tests/topotests/bfd_topo3/r6/bfdd.conf6
-rw-r--r--tests/topotests/bgp_accept_own/ce1/bgpd.conf2
-rw-r--r--tests/topotests/bgp_accept_own/ce2/bgpd.conf2
-rw-r--r--tests/topotests/bgp_accept_own/pe1/bgpd.conf8
-rw-r--r--tests/topotests/bgp_accept_own/rr1/bgpd.conf2
-rw-r--r--tests/topotests/bgp_comm_list_match/r2/bgpd.conf2
-rw-r--r--tests/topotests/bgp_confed1/r1/bgpd.conf8
-rw-r--r--tests/topotests/bgp_confed1/r2/bgpd.conf8
-rw-r--r--tests/topotests/bgp_confed1/r3/bgpd.conf8
-rw-r--r--tests/topotests/bgp_confed1/r4/bgpd.conf8
-rw-r--r--tests/topotests/bgp_dont_capability_negotiate/r1/bgpd.conf2
-rwxr-xr-xtests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py8
-rwxr-xr-xtests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py8
-rw-r--r--tests/topotests/bgp_prefix_list_any/r2/bgpd.conf2
-rw-r--r--tests/topotests/bgp_route_map_delay_timer/r1/bgpd.conf4
-rw-r--r--tests/topotests/bgp_route_map_vpn_import/r1/bgpd.conf10
-rw-r--r--tests/topotests/bgp_snmp_bgp4v2mib/r2/bgpd.conf2
-rw-r--r--tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/zebra.conf6
-rw-r--r--tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/zebra.conf6
-rw-r--r--tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/zebra.conf6
-rw-r--r--tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/bgpd.conf2
-rw-r--r--tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/zebra.conf6
-rw-r--r--tests/topotests/bgp_suppress_fib/r2/bgpd.allowas_in.conf12
-rw-r--r--tests/topotests/bgp_suppress_fib/r2/bgpd.conf8
-rw-r--r--tests/topotests/bgp_vrf_md5_peering/r1/bgpd.conf2
-rw-r--r--tests/topotests/isis_snmp/r5/ldpdconf8
-rw-r--r--tests/topotests/ospf6_ecmp_inter_area/r1/ospf6d.conf64
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py47
-rw-r--r--zebra/main.c10
40 files changed, 184 insertions, 701 deletions
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index c78e740ec9..fe77e7e250 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -845,8 +845,7 @@ void bgp_dump_init(void)
memset(&bgp_dump_routes, 0, sizeof(bgp_dump_routes));
bgp_dump_obuf =
- stream_new((BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE * 2)
- + BGP_DUMP_MSG_HEADER + BGP_DUMP_HEADER_SIZE);
+ stream_new(BGP_MAX_PACKET_SIZE + BGP_MAX_PACKET_SIZE_OVERFLOW);
install_node(&bgp_dump_node);
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 4441e86fbb..4813874748 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -3838,6 +3838,12 @@ bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
(type == ZEBRA_ROUTE_BGP && stype == BGP_ROUTE_STATIC) ? true
: false;
+ /* If `bgp allow-martian-nexthop` is turned on, return next-hop
+ * as good.
+ */
+ if (bgp->allow_martian)
+ return false;
+
/*
* Only validated for unicast and multicast currently.
* Also valid for EVPN where the nexthop is an IP address.
@@ -8338,30 +8344,7 @@ static int bgp_aggregate_unset(struct vty *vty, const char *prefix_str,
/* Unlock aggregate address configuration. */
bgp_dest_set_bgp_aggregate_info(dest, NULL);
- if (aggregate->community)
- community_free(&aggregate->community);
-
- hash_clean_and_free(&aggregate->community_hash,
- bgp_aggr_community_remove);
-
- if (aggregate->ecommunity)
- ecommunity_free(&aggregate->ecommunity);
-
- hash_clean_and_free(&aggregate->ecommunity_hash,
- bgp_aggr_ecommunity_remove);
-
- if (aggregate->lcommunity)
- lcommunity_free(&aggregate->lcommunity);
-
- hash_clean_and_free(&aggregate->lcommunity_hash,
- bgp_aggr_lcommunity_remove);
-
- if (aggregate->aspath)
- aspath_free(aggregate->aspath);
-
- hash_clean_and_free(&aggregate->aspath_hash, bgp_aggr_aspath_remove);
-
- bgp_aggregate_free(aggregate);
+ bgp_free_aggregate_info(aggregate);
bgp_dest_unlock_node(dest);
bgp_dest_unlock_node(dest);
@@ -8545,6 +8528,34 @@ DEFPY(aggregate_addressv4, aggregate_addressv4_cmd,
match_med != NULL, suppress_map);
}
+void bgp_free_aggregate_info(struct bgp_aggregate *aggregate)
+{
+ if (aggregate->community)
+ community_free(&aggregate->community);
+
+ hash_clean_and_free(&aggregate->community_hash,
+ bgp_aggr_community_remove);
+
+ if (aggregate->ecommunity)
+ ecommunity_free(&aggregate->ecommunity);
+
+ hash_clean_and_free(&aggregate->ecommunity_hash,
+ bgp_aggr_ecommunity_remove);
+
+ if (aggregate->lcommunity)
+ lcommunity_free(&aggregate->lcommunity);
+
+ hash_clean_and_free(&aggregate->lcommunity_hash,
+ bgp_aggr_lcommunity_remove);
+
+ if (aggregate->aspath)
+ aspath_free(aggregate->aspath);
+
+ hash_clean_and_free(&aggregate->aspath_hash, bgp_aggr_aspath_remove);
+
+ bgp_aggregate_free(aggregate);
+}
+
DEFPY(aggregate_addressv6, aggregate_addressv6_cmd,
"[no] aggregate-address X:X::X:X/M$prefix [{"
"as-set$as_set_s"
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index b48e8eda11..a64144b625 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -661,6 +661,7 @@ extern void bgp_process_queue_init(struct bgp *bgp);
extern void bgp_route_init(void);
extern void bgp_route_finish(void);
extern void bgp_cleanup_routes(struct bgp *);
+extern void bgp_free_aggregate_info(struct bgp_aggregate *aggregate);
extern void bgp_announce_route(struct peer *peer, afi_t afi, safi_t safi,
bool force);
extern void bgp_stop_announce_route_timer(struct peer_af *paf);
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 3d659d48d4..96b1f3e00f 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -834,6 +834,13 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
peer->bgp->vrf_id);
}
+ /* Handle peerings via loopbacks. For instance, peer between
+ * 127.0.0.1 and 127.0.0.2. In short, allow peering with self
+ * via 127.0.0.0/8.
+ */
+ if (!ifp && cmd_allow_reserved_ranges_get())
+ ifp = if_get_vrf_loopback(peer->bgp->vrf_id);
+
if (!ifp) {
/*
* BGP views do not currently get proper data
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 97238bc38b..9d7a1f967e 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -3844,6 +3844,23 @@ int bgp_delete(struct bgp *bgp)
#ifdef ENABLE_BGP_VNC
rfapi_delete(bgp);
#endif
+
+ /* Free memory allocated with aggregate address configuration. */
+ FOREACH_AFI_SAFI (afi, safi) {
+ struct bgp_aggregate *aggregate = NULL;
+
+ for (struct bgp_dest *dest =
+ bgp_table_top(bgp->aggregate[afi][safi]);
+ dest; dest = bgp_route_next(dest)) {
+ aggregate = bgp_dest_get_bgp_aggregate_info(dest);
+ if (aggregate == NULL)
+ continue;
+
+ bgp_dest_set_bgp_aggregate_info(dest, NULL);
+ bgp_free_aggregate_info(aggregate);
+ }
+ }
+
bgp_cleanup_routes(bgp);
for (afi = 0; afi < AFI_MAX; ++afi) {
diff --git a/doc/user/basic.rst b/doc/user/basic.rst
index 254dad8303..337cfff937 100644
--- a/doc/user/basic.rst
+++ b/doc/user/basic.rst
@@ -349,6 +349,10 @@ Basic Config Commands
Allow using IPv4 reserved (Class E) IP ranges for daemons. E.g.: setting
IPv4 addresses for interfaces or allowing reserved ranges in BGP next-hops.
+ If you need multiple FRR instances (or FRR + any other daemon) running in a
+ single router and peering via 127.0.0.0/8, it's also possible to use this
+ knob if turned on.
+
Default: off.
.. _sample-config-file:
diff --git a/lib/prefix.c b/lib/prefix.c
index a6aae08a6a..b8cad910f4 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -1399,7 +1399,7 @@ bool ipv4_unicast_valid(const struct in_addr *addr)
if (IPV4_CLASS_D(ip))
return false;
- if (IPV4_CLASS_E(ip)) {
+ if (IPV4_NET0(ip) || IPV4_NET127(ip) || IPV4_CLASS_E(ip)) {
if (cmd_allow_reserved_ranges_get())
return true;
else
diff --git a/lib/prefix.h b/lib/prefix.h
index 9c57283706..88a228b55c 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -499,11 +499,8 @@ extern int macstr2prefix_evpn(const char *str, struct prefix_evpn *p);
/* NOTE: This routine expects the address argument in network byte order. */
static inline bool ipv4_martian(const struct in_addr *addr)
{
- in_addr_t ip = ntohl(addr->s_addr);
-
- if (IPV4_NET0(ip) || IPV4_NET127(ip) || !ipv4_unicast_valid(addr)) {
+ if (!ipv4_unicast_valid(addr))
return true;
- }
return false;
}
diff --git a/mgmtd/mgmt_vty.c.safe b/mgmtd/mgmt_vty.c.safe
deleted file mode 100644
index c43485c92b..0000000000
--- a/mgmtd/mgmt_vty.c.safe
+++ /dev/null
@@ -1,506 +0,0 @@
-/*
- * MGMTD VTY Interface
- * Copyright (C) 2021 Vmware, Inc.
- * Pushpasis Sarkar <spushpasis@vmware.com>
- *
- * 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 "command.h"
-#include "json.h"
-#include "mgmtd/mgmt.h"
-#include "mgmtd/mgmt_be_server.h"
-#include "mgmtd/mgmt_be_adapter.h"
-#include "mgmtd/mgmt_fe_server.h"
-#include "mgmtd/mgmt_fe_adapter.h"
-#include "mgmtd/mgmt_ds.h"
-#include "mgmtd/mgmt_history.h"
-
-#include "mgmtd/mgmt_vty_clippy.c"
-
-DEFPY(show_mgmt_be_adapter,
- show_mgmt_be_adapter_cmd,
- "show mgmt backend-adapter all",
- SHOW_STR
- MGMTD_STR
- MGMTD_BE_ADAPTER_STR
- "Display all Backend Adapters\n")
-{
- mgmt_be_adapter_status_write(vty);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_be_xpath_reg,
- show_mgmt_be_xpath_reg_cmd,
- "show mgmt backend-yang-xpath-registry",
- SHOW_STR
- MGMTD_STR
- "Backend Adapter YANG Xpath Registry\n")
-{
- mgmt_be_xpath_register_write(vty);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_fe_adapter,
- show_mgmt_fe_adapter_cmd,
- "show mgmt frontend-adapter all",
- SHOW_STR MGMTD_STR MGMTD_FE_ADAPTER_STR "Display all Frontend Adapters\n")
-{
- mgmt_fe_adapter_status_write(vty, false);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_fe_adapter_detail, show_mgmt_fe_adapter_detail_cmd,
- "show mgmt frontend-adapter all detail",
- SHOW_STR MGMTD_STR MGMTD_FE_ADAPTER_STR
- "Display all Frontend Adapters\n"
- "Details of commit stats\n")
-{
- mgmt_fe_adapter_status_write(vty, true);
-
- return CMD_SUCCESS;
-}
-
-DEFPY_HIDDEN(mgmt_performance_measurement,
- mgmt_performance_measurement_cmd,
- "[no] mgmt performance-measurement",
- NO_STR
- MGMTD_STR
- "Enable performance measurement\n")
-{
- if (no)
- mgmt_fe_adapter_perf_measurement(vty, false);
- else
- mgmt_fe_adapter_perf_measurement(vty, true);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_reset_performance_stats,
- mgmt_reset_performance_stats_cmd,
- "mgmt reset-statistics",
- MGMTD_STR
- "Reset the Performance measurement statistics\n")
-{
- mgmt_fe_adapter_reset_perf_stats(vty);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_txn,
- show_mgmt_txn_cmd,
- "show mgmt transaction all",
- SHOW_STR
- MGMTD_STR
- MGMTD_TXN_STR
- "Display all Transactions\n")
-{
- mgmt_txn_status_write(vty);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_ds,
- show_mgmt_ds_cmd,
- "show mgmt datastore [all|candidate|operational|running]$dsname",
- SHOW_STR
- MGMTD_STR
- MGMTD_DS_STR
- "All datastores (default)\n"
- "Candidate datastore\n"
- "Operational datastore\n"
- "Running datastore\n")
-{
- struct mgmt_ds_ctx *ds_ctx;
-
- if (!dsname || dsname[0] == 'a') {
- mgmt_ds_status_write(vty);
- return CMD_SUCCESS;
- }
- ds_ctx = mgmt_ds_get_ctx_by_id(mm, mgmt_ds_name2id(dsname));
- if (!ds_ctx) {
- vty_out(vty, "ERROR: Could not access %s datastore!\n", dsname);
- return CMD_ERR_NO_MATCH;
- }
- mgmt_ds_status_write_one(vty, ds_ctx);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_commit,
- mgmt_commit_cmd,
- "mgmt commit <check|apply|abort>$type",
- MGMTD_STR
- "Commit action\n"
- "Validate the set of config commands\n"
- "Validate and apply the set of config commands\n"
- "Abort and drop the set of config commands recently added\n")
-{
- bool validate_only = type[0] == 'c';
- bool abort = type[1] == 'b';
-
- if (vty_mgmt_send_commit_config(vty, validate_only, abort) != 0)
- return CMD_WARNING_CONFIG_FAILED;
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_set_config_data, mgmt_set_config_data_cmd,
- "mgmt set-config WORD$path VALUE",
- MGMTD_STR
- "Set configuration data\n"
- "XPath expression specifying the YANG data path\n"
- "Value of the data to set\n")
-{
- strlcpy(vty->cfg_changes[0].xpath, path,
- sizeof(vty->cfg_changes[0].xpath));
- vty->cfg_changes[0].value = value;
- vty->cfg_changes[0].operation = NB_OP_CREATE;
- vty->num_cfg_changes = 1;
-
- vty->no_implicit_commit = true;
- vty_mgmt_send_config_data(vty);
- vty->no_implicit_commit = false;
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_delete_config_data, mgmt_delete_config_data_cmd,
- "mgmt delete-config WORD$path",
- MGMTD_STR
- "Delete configuration data\n"
- "XPath expression specifying the YANG data path\n")
-{
-
- strlcpy(vty->cfg_changes[0].xpath, path,
- sizeof(vty->cfg_changes[0].xpath));
- vty->cfg_changes[0].value = NULL;
- vty->cfg_changes[0].operation = NB_OP_DESTROY;
- vty->num_cfg_changes = 1;
-
- vty->no_implicit_commit = true;
- vty_mgmt_send_config_data(vty);
- vty->no_implicit_commit = false;
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_get_config, show_mgmt_get_config_cmd,
- "show mgmt get-config [candidate|operational|running]$dsname WORD$path",
- SHOW_STR MGMTD_STR
- "Get configuration data from a specific configuration datastore\n"
- "Candidate datastore (default)\n"
- "Operational datastore\n"
- "Running datastore\n"
- "XPath expression specifying the YANG data path\n")
-{
- const char *xpath_list[VTY_MAXCFGCHANGES] = {0};
- Mgmtd__DatastoreId datastore = MGMTD_DS_CANDIDATE;
-
- if (dsname)
- datastore = mgmt_ds_name2id(dsname);
-
- xpath_list[0] = path;
- vty_mgmt_send_get_config(vty, datastore, xpath_list, 1);
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_get_data, show_mgmt_get_data_cmd,
- "show mgmt get-data [candidate|operational|running]$dsname WORD$path",
- SHOW_STR MGMTD_STR
- "Get data from a specific datastore\n"
- "Candidate datastore\n"
- "Operational datastore (default)\n"
- "Running datastore\n"
- "XPath expression specifying the YANG data path\n")
-{
- const char *xpath_list[VTY_MAXCFGCHANGES] = {0};
- Mgmtd__DatastoreId datastore = MGMTD_DS_OPERATIONAL;
-
- if (dsname)
- datastore = mgmt_ds_name2id(dsname);
-
- xpath_list[0] = path;
- vty_mgmt_send_get_data(vty, datastore, xpath_list, 1);
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_dump_data,
- show_mgmt_dump_data_cmd,
- "show mgmt datastore-contents [candidate|operational|running]$dsname [xpath WORD$path] [file WORD$filepath] <json|xml>$fmt",
- SHOW_STR
- MGMTD_STR
- "Get Datastore contents from a specific datastore\n"
- "Candidate datastore (default)\n"
- "Operational datastore\n"
- "Running datastore\n"
- "XPath expression specifying the YANG data path\n"
- "XPath string\n"
- "Dump the contents to a file\n"
- "Full path of the file\n"
- "json output\n"
- "xml output\n")
-{
- struct mgmt_ds_ctx *ds_ctx;
- Mgmtd__DatastoreId datastore = MGMTD_DS_CANDIDATE;
- LYD_FORMAT format = fmt[0] == 'j' ? LYD_JSON : LYD_XML;
- FILE *f = NULL;
-
- if (datastore)
- datastore = mgmt_ds_name2id(dsname);
-
- ds_ctx = mgmt_ds_get_ctx_by_id(mm, datastore);
- if (!ds_ctx) {
- vty_out(vty, "ERROR: Could not access datastore!\n");
- return CMD_ERR_NO_MATCH;
- }
-
- if (filepath) {
- f = fopen(filepath, "w");
- if (!f) {
- vty_out(vty,
- "Could not open file pointed by filepath %s\n",
- filepath);
- return CMD_SUCCESS;
- }
- }
-
- mgmt_ds_dump_tree(vty, ds_ctx, path, f, format);
-
- if (f)
- fclose(f);
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_map_xpath,
- show_mgmt_map_xpath_cmd,
- "show mgmt yang-xpath-subscription WORD$path",
- SHOW_STR
- MGMTD_STR
- "Get YANG Backend Subscription\n"
- "XPath expression specifying the YANG data path\n")
-{
- mgmt_be_xpath_subscr_info_write(vty, path);
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_load_config,
- mgmt_load_config_cmd,
- "mgmt load-config WORD$filepath <merge|replace>$type",
- MGMTD_STR
- "Load configuration onto Candidate Datastore\n"
- "Full path of the file\n"
- "Merge configuration with contents of Candidate Datastore\n"
- "Replace the existing contents of Candidate datastore\n")
-{
- bool merge = type[0] == 'm' ? true : false;
- struct mgmt_ds_ctx *ds_ctx;
- int ret;
-
- if (access(filepath, F_OK) == -1) {
- vty_out(vty, "ERROR: File %s : %s\n", filepath,
- strerror(errno));
- return CMD_ERR_NO_FILE;
- }
-
- ds_ctx = mgmt_ds_get_ctx_by_id(mm, MGMTD_DS_CANDIDATE);
- if (!ds_ctx) {
- vty_out(vty, "ERROR: Could not access Candidate datastore!\n");
- return CMD_ERR_NO_MATCH;
- }
-
- ret = mgmt_ds_load_config_from_file(ds_ctx, filepath, merge);
- if (ret != 0)
- vty_out(vty, "Error with parsing the file with error code %d\n",
- ret);
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_save_config,
- mgmt_save_config_cmd,
- "mgmt save-config <candidate|running>$dsname WORD$filepath",
- MGMTD_STR
- "Save configuration from datastore\n"
- "Candidate datastore\n"
- "Running datastore\n"
- "Full path of the file\n")
-{
- Mgmtd__DatastoreId datastore = mgmt_ds_name2id(dsname);
- struct mgmt_ds_ctx *ds_ctx;
- FILE *f;
-
- ds_ctx = mgmt_ds_get_ctx_by_id(mm, datastore);
- if (!ds_ctx) {
- vty_out(vty, "ERROR: Could not access the '%s' datastore!\n",
- dsname);
- return CMD_ERR_NO_MATCH;
- }
-
- if (!filepath) {
- vty_out(vty, "ERROR: No file path mentioned!\n");
- return CMD_ERR_NO_MATCH;
- }
-
- f = fopen(filepath, "w");
- if (!f) {
- vty_out(vty, "Could not open file pointed by filepath %s\n",
- filepath);
- return CMD_SUCCESS;
- }
-
- mgmt_ds_dump_tree(vty, ds_ctx, "/", f, LYD_JSON);
-
- fclose(f);
-
- return CMD_SUCCESS;
-}
-
-DEFPY(show_mgmt_cmt_hist,
- show_mgmt_cmt_hist_cmd,
- "show mgmt commit-history",
- SHOW_STR
- MGMTD_STR
- "Show commit history\n")
-{
- show_mgmt_cmt_history(vty);
- return CMD_SUCCESS;
-}
-
-DEFPY(mgmt_rollback,
- mgmt_rollback_cmd,
- "mgmt rollback <commit-id WORD$commit | last [(1-10)]$last>",
- MGMTD_STR
- "Rollback commits\n"
- "Rollback to commit ID\n"
- "Commit-ID\n"
- "Rollbak n commits\n"
- "Number of commits\n")
-{
- if (commit)
- mgmt_history_rollback_by_id(vty, commit);
- else
- mgmt_history_rollback_n(vty, last);
-
- return CMD_SUCCESS;
-}
-
-static int config_write_mgmt_debug(struct vty *vty);
-static struct cmd_node debug_node = {
- .name = "debug",
- .node = DEBUG_NODE,
- .prompt = "",
- .config_write = config_write_mgmt_debug,
-};
-
-static int config_write_mgmt_debug(struct vty *vty)
-{
- int n = mgmt_debug_be + mgmt_debug_fe + mgmt_debug_ds + mgmt_debug_txn;
- if (!n)
- return 0;
- if (n == 4) {
- vty_out(vty, "debug mgmt all\n");
- return 0;
- }
-
- vty_out(vty, "debug mgmt");
- if (mgmt_debug_be)
- vty_out(vty, " backend");
- if (mgmt_debug_ds)
- vty_out(vty, " datastore");
- if (mgmt_debug_fe)
- vty_out(vty, " frontend");
- if (mgmt_debug_txn)
- vty_out(vty, " transaction");
-
- vty_out(vty, "\n");
-
- return 0;
-}
-
-DEFPY(debug_mgmt,
- debug_mgmt_cmd,
- "[no$no] debug mgmt <all$all|{backend$be|datastore$ds|frontend$fe|transaction$txn}>",
- NO_STR
- DEBUG_STR
- MGMTD_STR
- "All debug\n"
- "Back-end debug\n"
- "Datastore debug\n"
- "Front-end debug\n"
- "Transaction debug\n")
-{
- bool set = !no;
- if (all)
- be = fe = ds = txn = set ? all : NULL;
-
- if (be)
- mgmt_debug_be = set;
- if (ds)
- mgmt_debug_ds = set;
- if (fe)
- mgmt_debug_fe = set;
- if (txn)
- mgmt_debug_txn = set;
-
- return CMD_SUCCESS;
-}
-
-void mgmt_vty_init(void)
-{
- /*
- * Initialize command handling from VTYSH connection.
- * Call command initialization routines defined by
- * backend components that are moved to new MGMTD infra
- * here one by one.
- */
-#if HAVE_STATICD
- extern void static_vty_init(void);
- static_vty_init();
-#endif
-
- install_node(&debug_node);
-
- install_element(VIEW_NODE, &show_mgmt_be_adapter_cmd);
- install_element(VIEW_NODE, &show_mgmt_be_xpath_reg_cmd);
- install_element(VIEW_NODE, &show_mgmt_fe_adapter_cmd);
- install_element(VIEW_NODE, &show_mgmt_fe_adapter_detail_cmd);
- install_element(VIEW_NODE, &show_mgmt_txn_cmd);
- install_element(VIEW_NODE, &show_mgmt_ds_cmd);
- install_element(VIEW_NODE, &show_mgmt_get_config_cmd);
- install_element(VIEW_NODE, &show_mgmt_get_data_cmd);
- install_element(VIEW_NODE, &show_mgmt_dump_data_cmd);
- install_element(VIEW_NODE, &show_mgmt_map_xpath_cmd);
- install_element(VIEW_NODE, &show_mgmt_cmt_hist_cmd);
-
- install_element(CONFIG_NODE, &mgmt_commit_cmd);
- install_element(CONFIG_NODE, &mgmt_set_config_data_cmd);
- install_element(CONFIG_NODE, &mgmt_delete_config_data_cmd);
- install_element(CONFIG_NODE, &mgmt_load_config_cmd);
- install_element(CONFIG_NODE, &mgmt_save_config_cmd);
- install_element(CONFIG_NODE, &mgmt_rollback_cmd);
-
- install_element(VIEW_NODE, &debug_mgmt_cmd);
- install_element(CONFIG_NODE, &debug_mgmt_cmd);
-
- /* Enable view */
- install_element(ENABLE_NODE, &mgmt_performance_measurement_cmd);
- install_element(ENABLE_NODE, &mgmt_reset_performance_stats_cmd);
-
- /*
- * TODO: Register and handlers for auto-completion here.
- */
-}
diff --git a/tests/topotests/all_protocol_startup/r1/ospf6d.conf-pre-v4 b/tests/topotests/all_protocol_startup/r1/ospf6d.conf-pre-v4
index 6d870f355f..9ce2f2e825 100644
--- a/tests/topotests/all_protocol_startup/r1/ospf6d.conf-pre-v4
+++ b/tests/topotests/all_protocol_startup/r1/ospf6d.conf-pre-v4
@@ -1,9 +1,9 @@
log file ospf6d.log
!
-debug ospf6 lsa unknown
-debug ospf6 zebra
-debug ospf6 interface
-debug ospf6 neighbor
+!debug ospf6 lsa unknown
+!debug ospf6 zebra
+!debug ospf6 interface
+!debug ospf6 neighbor
!
interface r1-eth4
!
diff --git a/tests/topotests/bfd_topo3/r5/bfdd.conf b/tests/topotests/bfd_topo3/r5/bfdd.conf
index 6d4483acc4..ec62d8d275 100644
--- a/tests/topotests/bfd_topo3/r5/bfdd.conf
+++ b/tests/topotests/bfd_topo3/r5/bfdd.conf
@@ -1,6 +1,6 @@
-debug bfd network
-debug bfd peer
-debug bfd zebra
+!debug bfd network
+!debug bfd peer
+!debug bfd zebra
!
bfd
profile slow-tx
diff --git a/tests/topotests/bfd_topo3/r6/bfdd.conf b/tests/topotests/bfd_topo3/r6/bfdd.conf
index 6d4483acc4..ec62d8d275 100644
--- a/tests/topotests/bfd_topo3/r6/bfdd.conf
+++ b/tests/topotests/bfd_topo3/r6/bfdd.conf
@@ -1,6 +1,6 @@
-debug bfd network
-debug bfd peer
-debug bfd zebra
+!debug bfd network
+!debug bfd peer
+!debug bfd zebra
!
bfd
profile slow-tx
diff --git a/tests/topotests/bgp_accept_own/ce1/bgpd.conf b/tests/topotests/bgp_accept_own/ce1/bgpd.conf
index fa53a42919..44f95b9bb3 100644
--- a/tests/topotests/bgp_accept_own/ce1/bgpd.conf
+++ b/tests/topotests/bgp_accept_own/ce1/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp updates
+!debug bgp updates
!
router bgp 65010
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_accept_own/ce2/bgpd.conf b/tests/topotests/bgp_accept_own/ce2/bgpd.conf
index cdf8898c90..d60fdcf7cb 100644
--- a/tests/topotests/bgp_accept_own/ce2/bgpd.conf
+++ b/tests/topotests/bgp_accept_own/ce2/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp updates
+!debug bgp updates
!
router bgp 65020
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_accept_own/pe1/bgpd.conf b/tests/topotests/bgp_accept_own/pe1/bgpd.conf
index 109e0eadbb..15466b4259 100644
--- a/tests/topotests/bgp_accept_own/pe1/bgpd.conf
+++ b/tests/topotests/bgp_accept_own/pe1/bgpd.conf
@@ -1,8 +1,8 @@
!
-debug bgp updates
-debug bgp vpn leak-from-vrf
-debug bgp vpn leak-to-vrf
-debug bgp nht
+!debug bgp updates
+!debug bgp vpn leak-from-vrf
+!debug bgp vpn leak-to-vrf
+!debug bgp nht
!
router bgp 65001
bgp router-id 10.10.10.10
diff --git a/tests/topotests/bgp_accept_own/rr1/bgpd.conf b/tests/topotests/bgp_accept_own/rr1/bgpd.conf
index 4f0a6ab0f1..ad0ee3e471 100644
--- a/tests/topotests/bgp_accept_own/rr1/bgpd.conf
+++ b/tests/topotests/bgp_accept_own/rr1/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp updates
+!debug bgp updates
!
router bgp 65001
bgp router-id 10.10.10.101
diff --git a/tests/topotests/bgp_comm_list_match/r2/bgpd.conf b/tests/topotests/bgp_comm_list_match/r2/bgpd.conf
index 35ad2d32e6..98a9780688 100644
--- a/tests/topotests/bgp_comm_list_match/r2/bgpd.conf
+++ b/tests/topotests/bgp_comm_list_match/r2/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp updates
+!debug bgp updates
!
router bgp 65002
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_confed1/r1/bgpd.conf b/tests/topotests/bgp_confed1/r1/bgpd.conf
index 8413ef7fc3..107d2ad8d2 100644
--- a/tests/topotests/bgp_confed1/r1/bgpd.conf
+++ b/tests/topotests/bgp_confed1/r1/bgpd.conf
@@ -1,7 +1,7 @@
-debug bgp neighbor-events
-debug bgp nht
-debug bgp updates in
-debug bgp updates out
+!debug bgp neighbor-events
+!debug bgp nht
+!debug bgp updates in
+!debug bgp updates out
!
router bgp 100
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_confed1/r2/bgpd.conf b/tests/topotests/bgp_confed1/r2/bgpd.conf
index 9f6a9852de..fe13dfe729 100644
--- a/tests/topotests/bgp_confed1/r2/bgpd.conf
+++ b/tests/topotests/bgp_confed1/r2/bgpd.conf
@@ -1,7 +1,7 @@
-debug bgp neighbor-events
-debug bgp nht
-debug bgp updates in
-debug bgp updates out
+!debug bgp neighbor-events
+!debug bgp nht
+!debug bgp updates in
+!debug bgp updates out
!
router bgp 200
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_confed1/r3/bgpd.conf b/tests/topotests/bgp_confed1/r3/bgpd.conf
index 3a018a42b3..74d5fd6e29 100644
--- a/tests/topotests/bgp_confed1/r3/bgpd.conf
+++ b/tests/topotests/bgp_confed1/r3/bgpd.conf
@@ -1,7 +1,7 @@
-debug bgp neighbor-events
-debug bgp nht
-debug bgp updates in
-debug bgp updates out
+!debug bgp neighbor-events
+!debug bgp nht
+!debug bgp updates in
+!debug bgp updates out
!
router bgp 300
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_confed1/r4/bgpd.conf b/tests/topotests/bgp_confed1/r4/bgpd.conf
index 134f221543..89a85e5a34 100644
--- a/tests/topotests/bgp_confed1/r4/bgpd.conf
+++ b/tests/topotests/bgp_confed1/r4/bgpd.conf
@@ -1,7 +1,7 @@
-debug bgp neighbor-events
-debug bgp nht
-debug bgp updates in
-debug bgp updates out
+!debug bgp neighbor-events
+!debug bgp nht
+!debug bgp updates in
+!debug bgp updates out
!
router bgp 400
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_dont_capability_negotiate/r1/bgpd.conf b/tests/topotests/bgp_dont_capability_negotiate/r1/bgpd.conf
index e2ff1df965..2f76d59d4a 100644
--- a/tests/topotests/bgp_dont_capability_negotiate/r1/bgpd.conf
+++ b/tests/topotests/bgp_dont_capability_negotiate/r1/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp neighbor
+!debug bgp neighbor
!
router bgp 65001
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py b/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py
index f8af210ed7..8b9631175a 100755
--- a/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py
+++ b/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py
@@ -463,8 +463,8 @@ def test_ip_pe1_learn():
host1 = tgen.gears["host1"]
pe1 = tgen.gears["PE1"]
pe2 = tgen.gears["PE2"]
- pe2.vtysh_cmd("debug zebra vxlan")
- pe2.vtysh_cmd("debug zebra kernel")
+ #pe2.vtysh_cmd("debug zebra vxlan")
+ #pe2.vtysh_cmd("debug zebra kernel")
# lets populate that arp cache
host1.run("ping -c1 10.10.1.1")
ip_learn_test(tgen, host1, pe1, pe2, "10.10.1.55")
@@ -482,8 +482,8 @@ def test_ip_pe2_learn():
host2 = tgen.gears["host2"]
pe1 = tgen.gears["PE1"]
pe2 = tgen.gears["PE2"]
- pe1.vtysh_cmd("debug zebra vxlan")
- pe1.vtysh_cmd("debug zebra kernel")
+ #pe1.vtysh_cmd("debug zebra vxlan")
+ #pe1.vtysh_cmd("debug zebra kernel")
# lets populate that arp cache
host2.run("ping -c1 10.10.1.3")
ip_learn_test(tgen, host2, pe2, pe1, "10.10.1.56")
diff --git a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
index 48b79ab5ee..6561833d6e 100755
--- a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
+++ b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
@@ -385,8 +385,8 @@ def test_ip_pe1_learn():
host1 = tgen.gears["host1"]
pe1 = tgen.gears["PE1"]
pe2 = tgen.gears["PE2"]
- pe2.vtysh_cmd("debug zebra vxlan")
- pe2.vtysh_cmd("debug zebra kernel")
+ #pe2.vtysh_cmd("debug zebra vxlan")
+ #pe2.vtysh_cmd("debug zebra kernel")
# lets populate that arp cache
host1.run("ping -c1 10.10.1.1")
ip_learn_test(tgen, host1, pe1, pe2, "10.10.1.55")
@@ -404,8 +404,8 @@ def test_ip_pe2_learn():
host2 = tgen.gears["host2"]
pe1 = tgen.gears["PE1"]
pe2 = tgen.gears["PE2"]
- pe1.vtysh_cmd("debug zebra vxlan")
- pe1.vtysh_cmd("debug zebra kernel")
+ #pe1.vtysh_cmd("debug zebra vxlan")
+ #pe1.vtysh_cmd("debug zebra kernel")
# lets populate that arp cache
host2.run("ping -c1 10.10.1.3")
ip_learn_test(tgen, host2, pe2, pe1, "10.10.1.56")
diff --git a/tests/topotests/bgp_prefix_list_any/r2/bgpd.conf b/tests/topotests/bgp_prefix_list_any/r2/bgpd.conf
index 77f7c5581b..733205928f 100644
--- a/tests/topotests/bgp_prefix_list_any/r2/bgpd.conf
+++ b/tests/topotests/bgp_prefix_list_any/r2/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp updates
+!debug bgp updates
!
router bgp 65002
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_route_map_delay_timer/r1/bgpd.conf b/tests/topotests/bgp_route_map_delay_timer/r1/bgpd.conf
index 04dc73a06d..e5325c91bc 100644
--- a/tests/topotests/bgp_route_map_delay_timer/r1/bgpd.conf
+++ b/tests/topotests/bgp_route_map_delay_timer/r1/bgpd.conf
@@ -1,6 +1,6 @@
!
-debug bgp updates
-debug bgp neighbor
+!debug bgp updates
+!debug bgp neighbor
!
bgp route-map delay-timer 5
!
diff --git a/tests/topotests/bgp_route_map_vpn_import/r1/bgpd.conf b/tests/topotests/bgp_route_map_vpn_import/r1/bgpd.conf
index c9ad0b1a5b..4aa11ec9d0 100644
--- a/tests/topotests/bgp_route_map_vpn_import/r1/bgpd.conf
+++ b/tests/topotests/bgp_route_map_vpn_import/r1/bgpd.conf
@@ -1,9 +1,9 @@
!
-debug bgp updates
-debug bgp vpn leak-from-vrf
-debug bgp vpn leak-to-vrf
-debug bgp nht
-debug route-map
+!debug bgp updates
+!debug bgp vpn leak-from-vrf
+!debug bgp vpn leak-to-vrf
+!debug bgp nht
+!debug route-map
!
router bgp 65001
bgp router-id 10.10.10.10
diff --git a/tests/topotests/bgp_snmp_bgp4v2mib/r2/bgpd.conf b/tests/topotests/bgp_snmp_bgp4v2mib/r2/bgpd.conf
index 3512e66cec..cf0013e1b7 100644
--- a/tests/topotests/bgp_snmp_bgp4v2mib/r2/bgpd.conf
+++ b/tests/topotests/bgp_snmp_bgp4v2mib/r2/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp updates
+!debug bgp updates
!
router bgp 65002
no bgp ebgp-requires-policy
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/zebra.conf b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/zebra.conf
index a9319a6aed..cbc5ce1f09 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/zebra.conf
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/zebra.conf
@@ -7,9 +7,9 @@ log stdout notifications
log monitor notifications
log commands
!
-debug zebra packet
-debug zebra dplane
-debug zebra kernel
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
!
interface eth0
ipv6 address 2001::1/64
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/zebra.conf b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/zebra.conf
index 9e5fa0ac07..449ca74d5e 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/zebra.conf
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/zebra.conf
@@ -7,9 +7,9 @@ log stdout notifications
log monitor notifications
log commands
!
-debug zebra packet
-debug zebra dplane
-debug zebra kernel
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
!
interface eth0
ipv6 address 2001::2/64
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/zebra.conf b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/zebra.conf
index 2c560dfc06..f913b9f002 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/zebra.conf
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/zebra.conf
@@ -7,9 +7,9 @@ log stdout notifications
log monitor notifications
log commands
!
-debug zebra packet
-debug zebra dplane
-debug zebra kernel
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
!
interface eth0
ipv6 address 2001::1/64
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/bgpd.conf b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/bgpd.conf
index 8700f12d63..4ab5b98c12 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/bgpd.conf
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/bgpd.conf
@@ -1,6 +1,6 @@
frr defaults traditional
!
-bgp send-extra-data zebra
+!bgp send-extra-data zebra
!
hostname r2
password zebra
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/zebra.conf b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/zebra.conf
index b9277a9a8c..201d0cce23 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/zebra.conf
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/zebra.conf
@@ -7,9 +7,9 @@ log stdout notifications
log monitor notifications
log commands
!
-debug zebra packet
-debug zebra dplane
-debug zebra kernel
+!debug zebra packet
+!debug zebra dplane
+!debug zebra kernel
!
interface eth0
ipv6 address 2001::2/64
diff --git a/tests/topotests/bgp_suppress_fib/r2/bgpd.allowas_in.conf b/tests/topotests/bgp_suppress_fib/r2/bgpd.allowas_in.conf
index caebb0e922..fb6980a139 100644
--- a/tests/topotests/bgp_suppress_fib/r2/bgpd.allowas_in.conf
+++ b/tests/topotests/bgp_suppress_fib/r2/bgpd.allowas_in.conf
@@ -2,12 +2,12 @@ access-list access seq 10 permit 192.168.1.1/32
!
ip route 192.168.1.1/32 10.0.0.10
!
-debug bgp bestpath
-debug bgp nht
-debug bgp updates
-debug bgp update-groups
-debug bgp zebra
-debug zebra rib detail
+!debug bgp bestpath
+!debug bgp nht
+!debug bgp updates
+!debug bgp update-groups
+!debug bgp zebra
+!debug zebra rib detail
!
router bgp 2
address-family ipv4 uni
diff --git a/tests/topotests/bgp_suppress_fib/r2/bgpd.conf b/tests/topotests/bgp_suppress_fib/r2/bgpd.conf
index 010e86aad7..129b812036 100644
--- a/tests/topotests/bgp_suppress_fib/r2/bgpd.conf
+++ b/tests/topotests/bgp_suppress_fib/r2/bgpd.conf
@@ -1,6 +1,6 @@
-debug bgp updates
-debug bgp bestpath 40.0.0.0/8
-debug bgp zebra
+!debug bgp updates
+!debug bgp bestpath 40.0.0.0/8
+!debug bgp zebra
!
router bgp 2
no bgp ebgp-requires-policy
@@ -8,4 +8,4 @@ router bgp 2
neighbor 10.0.0.1 remote-as 1
neighbor 10.0.0.10 remote-as 3
address-family ipv4 uni
- network 60.0.0.0/24 \ No newline at end of file
+ network 60.0.0.0/24
diff --git a/tests/topotests/bgp_vrf_md5_peering/r1/bgpd.conf b/tests/topotests/bgp_vrf_md5_peering/r1/bgpd.conf
index 8d8f64158f..9f2ee19357 100644
--- a/tests/topotests/bgp_vrf_md5_peering/r1/bgpd.conf
+++ b/tests/topotests/bgp_vrf_md5_peering/r1/bgpd.conf
@@ -1,5 +1,5 @@
!
-debug bgp neighbor
+!debug bgp neighbor
!
router bgp 65534 vrf public
bgp router-id 10.0.0.1
diff --git a/tests/topotests/isis_snmp/r5/ldpdconf b/tests/topotests/isis_snmp/r5/ldpdconf
index fc700608b5..b3d10b07ec 100644
--- a/tests/topotests/isis_snmp/r5/ldpdconf
+++ b/tests/topotests/isis_snmp/r5/ldpdconf
@@ -1,10 +1,10 @@
hostname r5
log file ldpd.log
!
-debug mpls ldp zebra
-debug mpls ldp event
-debug mpls ldp errors
-debug mpls ldp sync
+!debug mpls ldp zebra
+!debug mpls ldp event
+!debug mpls ldp errors
+!debug mpls ldp sync
!
mpls ldp
router-id 3.3.3.3
diff --git a/tests/topotests/ospf6_ecmp_inter_area/r1/ospf6d.conf b/tests/topotests/ospf6_ecmp_inter_area/r1/ospf6d.conf
index 6c7cb96240..e6e5733010 100644
--- a/tests/topotests/ospf6_ecmp_inter_area/r1/ospf6d.conf
+++ b/tests/topotests/ospf6_ecmp_inter_area/r1/ospf6d.conf
@@ -1,35 +1,35 @@
-debug ospf6 lsa all
-debug ospf6 message all
-debug ospf6 route all
-debug ospf6 spf time
-debug ospf6 spf database
-debug ospf6 zebra send
-debug ospf6 zebra recv
-
-debug ospf6 lsa router
-debug ospf6 lsa router originate
-debug ospf6 lsa router examine
-debug ospf6 lsa router flooding
-debug ospf6 lsa as-external
-debug ospf6 lsa as-external originate
-debug ospf6 lsa as-external examine
-debug ospf6 lsa as-external flooding
-debug ospf6 lsa intra-prefix
-debug ospf6 lsa intra-prefix originate
-debug ospf6 lsa intra-prefix examine
-debug ospf6 lsa intra-prefix flooding
-debug ospf6 border-routers
-debug ospf6 zebra
-debug ospf6 interface
-debug ospf6 neighbor
-debug ospf6 flooding
-debug ospf6 gr helper
-debug ospf6 spf process
-debug ospf6 route intra-area
-debug ospf6 route inter-area
-debug ospf6 abr
-debug ospf6 asbr
-debug ospf6 nssa
+!debug ospf6 lsa all
+!debug ospf6 message all
+!debug ospf6 route all
+!debug ospf6 spf time
+!debug ospf6 spf database
+!debug ospf6 zebra send
+!debug ospf6 zebra recv
+!
+!debug ospf6 lsa router
+!debug ospf6 lsa router originate
+!debug ospf6 lsa router examine
+!debug ospf6 lsa router flooding
+!debug ospf6 lsa as-external
+!debug ospf6 lsa as-external originate
+!debug ospf6 lsa as-external examine
+!debug ospf6 lsa as-external flooding
+!debug ospf6 lsa intra-prefix
+!debug ospf6 lsa intra-prefix originate
+!debug ospf6 lsa intra-prefix examine
+!debug ospf6 lsa intra-prefix flooding
+!debug ospf6 border-routers
+!debug ospf6 zebra
+!debug ospf6 interface
+!debug ospf6 neighbor
+!debug ospf6 flooding
+!debug ospf6 gr helper
+!debug ospf6 spf process
+!debug ospf6 route intra-area
+!debug ospf6 route inter-area
+!debug ospf6 abr
+!debug ospf6 asbr
+!debug ospf6 nssa
!
interface r1-eth0
ipv6 ospf6 area 0
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
index 6f23294a1a..7199f160fe 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
@@ -1079,53 +1079,6 @@ def test_ospfv3_show_p1(request):
result = create_debug_log_config(tgen, input_dict)
- # Code coverage steps #Do Not upstream
- input_dict_config = {
- "r1": {
- "raw_config": [
- "end",
- "debug ospf6 event",
- "debug ospf6 gr helper",
- "debug ospf6 ism events",
- "debug ospf6 ism status",
- "debug ospf6 ism timers",
- "debug ospf6 nsm events",
- "debug ospf6 nsm status",
- "debug ospf6 nsm timers ",
- "debug ospf6 nssa",
- "debug ospf6 lsa aggregate",
- "debug ospf6 lsa flooding ",
- "debug ospf6 lsa generate",
- "debug ospf6 lsa install ",
- "debug ospf6 lsa refresh",
- "debug ospf6 packet all detail",
- "debug ospf6 packet all recv",
- "debug ospf6 packet all send",
- "debug ospf6 packet dd detail",
- "debug ospf6 packet dd recv",
- "debug ospf6 packet dd send ",
- "debug ospf6 packet hello detail",
- "debug ospf6 packet hello recv",
- "debug ospf6 packet hello send",
- "debug ospf6 packet ls-ack detail",
- "debug ospf6 packet ls-ack recv",
- "debug ospf6 packet ls-ack send",
- "debug ospf6 packet ls-request detail",
- "debug ospf6 packet ls-request recv",
- "debug ospf6 packet ls-request send",
- "debug ospf6 packet ls-update detail",
- "debug ospf6 packet ls-update recv",
- "debug ospf6 packet ls-update send",
- "debug ospf6 sr",
- "debug ospf6 te ",
- "debug ospf6 zebra interface",
- "debug ospf6 zebra redistribute",
- ]
- }
- }
-
- apply_raw_config(tgen, input_dict_config)
-
for rtr in topo["routers"]:
clear_ospf(tgen, rtr, ospf="ospf6")
diff --git a/zebra/main.c b/zebra/main.c
index ba43ae910b..78932bfced 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -175,11 +175,6 @@ static void sigint(void)
if (zrouter.lsp_process_q)
work_queue_free_and_null(&zrouter.lsp_process_q);
- vrf_terminate();
-
- ns_walk_func(zebra_ns_early_shutdown, NULL, NULL);
- zebra_ns_notify_close();
-
access_list_reset();
prefix_list_reset();
/*
@@ -207,6 +202,11 @@ void zebra_finalize(struct event *dummy)
{
zlog_info("Zebra final shutdown");
+ vrf_terminate();
+
+ ns_walk_func(zebra_ns_early_shutdown, NULL, NULL);
+ zebra_ns_notify_close();
+
/* Stop dplane thread and finish any cleanup */
zebra_dplane_shutdown();