summaryrefslogtreecommitdiff
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2017-08-11 16:37:02 +0200
committerGitHub <noreply@github.com>2017-08-11 16:37:02 +0200
commit4d30c6530edfa465620db5e5dfc0a618a55cc23f (patch)
tree24cd84dc54f8211bae2afa94805dc5517672f88c /bgpd/bgp_debug.c
parent72faaf794622ce8786f0c80bb913cb16ab44d23b (diff)
parent87f42c2cfaa50e61805b67d14a9102361f5c2ccc (diff)
Merge pull request #954 from qlyoung/bgp-declvar
bgpd: don't use DECLVAR without qobj pointer
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 1e7567299c..bcb3c5fc18 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -1359,12 +1359,15 @@ DEFUN (no_debug_bgp_update,
BGP_STR
"BGP updates\n")
{
- VTY_DECLVAR_CONTEXT(bgp, bgp);
+ struct listnode *ln;
+ struct bgp *bgp;
+
bgp_debug_list_free(bgp_debug_update_in_peers);
bgp_debug_list_free(bgp_debug_update_out_peers);
bgp_debug_list_free(bgp_debug_update_prefixes);
- bgp_debug_clear_updgrp_update_dbg(bgp);
+ for (ALL_LIST_ELEMENTS_RO(bm->bgp, ln, bgp))
+ bgp_debug_clear_updgrp_update_dbg(bgp);
if (vty->node == CONFIG_NODE) {
DEBUG_OFF(update, UPDATE_IN);
@@ -1583,7 +1586,9 @@ DEFUN (no_debug_bgp,
DEBUG_STR
BGP_STR)
{
- VTY_DECLVAR_CONTEXT(bgp, bgp);
+ struct bgp *bgp;
+ struct listnode *ln;
+
bgp_debug_list_free(bgp_debug_neighbor_events_peers);
bgp_debug_list_free(bgp_debug_keepalive_peers);
bgp_debug_list_free(bgp_debug_update_in_peers);
@@ -1592,7 +1597,8 @@ DEFUN (no_debug_bgp,
bgp_debug_list_free(bgp_debug_bestpath_prefixes);
bgp_debug_list_free(bgp_debug_zebra_prefixes);
- bgp_debug_clear_updgrp_update_dbg(bgp);
+ for (ALL_LIST_ELEMENTS_RO(bm->bgp, ln, bgp))
+ bgp_debug_clear_updgrp_update_dbg(bgp);
TERM_DEBUG_OFF(keepalive, KEEPALIVE);
TERM_DEBUG_OFF(update, UPDATE_IN);