diff options
| -rw-r--r-- | bgpd/bgp_bfd.c | 3 | ||||
| -rw-r--r-- | bgpd/bgp_mplsvpn.c | 7 | ||||
| -rw-r--r-- | doc/user/basic.rst | 5 | ||||
| -rw-r--r-- | lib/bfd.c | 3 | ||||
| -rw-r--r-- | vtysh/vtysh.c | 9 |
5 files changed, 14 insertions, 13 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index f1bdcc8bb4..958d7cf0ed 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -424,8 +424,7 @@ void bgp_bfd_peer_config_write(struct vty *vty, const struct peer *peer, void bgp_bfd_show_info(struct vty *vty, const struct peer *peer, json_object *json_neigh) { - if (peer->bfd_config->session) - bfd_sess_show(vty, json_neigh, peer->bfd_config->session); + bfd_sess_show(vty, json_neigh, peer->bfd_config->session); } DEFUN (neighbor_bfd, diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index a902c63dea..62fed931f9 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1417,7 +1417,6 @@ void vpn_leak_to_vrf_update_all(struct bgp *bgp_vrf, /* to */ struct bgp *bgp_vpn, /* from */ afi_t afi) { - struct prefix_rd prd; struct bgp_dest *pdest; safi_t safi = SAFI_MPLS_VPN; @@ -1428,16 +1427,10 @@ void vpn_leak_to_vrf_update_all(struct bgp *bgp_vrf, /* to */ */ for (pdest = bgp_table_top(bgp_vpn->rib[afi][safi]); pdest; pdest = bgp_route_next(pdest)) { - const struct prefix *p = bgp_dest_get_prefix(pdest); struct bgp_table *table; struct bgp_dest *bn; struct bgp_path_info *bpi; - memset(&prd, 0, sizeof(prd)); - prd.family = AF_UNSPEC; - prd.prefixlen = 64; - memcpy(prd.val, &p->u.val, 8); - /* This is the per-RD table of prefixes */ table = bgp_dest_get_bgp_table_info(pdest); diff --git a/doc/user/basic.rst b/doc/user/basic.rst index 5cbd3692dc..d78eb9b177 100644 --- a/doc/user/basic.rst +++ b/doc/user/basic.rst @@ -444,7 +444,7 @@ Terminal Mode Commands Shows the current log filters applied to each daemon. -.. clicmd:: show memory +.. clicmd:: show memory [DAEMON] Show information on how much memory is used for which specific things in |PACKAGE_NAME|. Output may vary depending on system capabilities but will @@ -502,7 +502,8 @@ Terminal Mode Commands the column may be missing if system support is not available. When executing this command from ``vtysh``, each of the daemons' memory - usage is printed sequentially. + usage is printed sequentially. You can specify the daemon's name to print + only its memory usage. .. clicmd:: show history @@ -988,6 +988,9 @@ void bfd_sess_show(struct vty *vty, struct json_object *json, json_object *json_bfd = NULL; char time_buf[64]; + if (!bsp) + return; + /* Show type. */ if (json) { json_bfd = json_object_new_object(); diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 3764188292..931eb91593 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2932,10 +2932,15 @@ DEFUN (vtysh_show_history, /* Memory */ DEFUN (vtysh_show_memory, vtysh_show_memory_cmd, - "show memory", + "show memory [" DAEMONS_LIST "]", SHOW_STR - "Memory statistics\n") + "Memory statistics\n" + DAEMONS_STR) { + if (argc == 3) + return show_one_daemon(vty, argv, argc - 1, + argv[argc - 1]->text); + return show_per_daemon(vty, argv, argc, "Memory statistics for %s:\n"); } |
