summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_vty.c2
-rw-r--r--staticd/static_vty.c8
-rw-r--r--zebra/zebra_vty.c7
3 files changed, 8 insertions, 9 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 06caebe567..f83b146175 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -9722,7 +9722,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
json_object_string_add(
json_nxt,
print_store,
- "received");
+ "recieved"); /* misspelled for compatibility */
}
}
json_object_object_add(
diff --git a/staticd/static_vty.c b/staticd/static_vty.c
index 59d4ae924b..ae0026cc97 100644
--- a/staticd/static_vty.c
+++ b/staticd/static_vty.c
@@ -1211,7 +1211,7 @@ DEFPY(ipv6_route_address_interface,
{
struct static_vrf *svrf;
struct static_vrf *nh_svrf;
- const char *flag;
+ const char *flag = NULL;
if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) {
vty_out(vty,
@@ -1280,7 +1280,7 @@ DEFPY(ipv6_route_address_interface_vrf,
VTY_DECLVAR_CONTEXT(vrf, vrf);
struct static_vrf *svrf = vrf->info;
struct static_vrf *nh_svrf;
- const char *flag;
+ const char *flag = NULL;
if (table_str && !vrf_is_mapped_on_netns(vrf)) {
vty_out(vty,
@@ -1341,7 +1341,7 @@ DEFPY(ipv6_route,
{
struct static_vrf *svrf;
struct static_vrf *nh_svrf;
- const char *flag;
+ const char *flag = NULL;
if (table_str && vrf && !vrf_is_mapped_on_netns(vrf_lookup_by_name(vrf))) {
vty_out(vty,
@@ -1407,7 +1407,7 @@ DEFPY(ipv6_route_vrf,
VTY_DECLVAR_CONTEXT(vrf, vrf);
struct static_vrf *svrf = vrf->info;
struct static_vrf *nh_svrf;
- const char *flag;
+ const char *flag = NULL;
if (table_str && !vrf_is_mapped_on_netns(vrf)) {
vty_out(vty,
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 7052fab01c..e6cc802d08 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -732,15 +732,14 @@ static void vty_show_ip_route_detail_json(struct vty *vty,
char buf[BUFSIZ];
json = json_object_new_object();
+ json_prefix = json_object_new_array();
RNODE_FOREACH_RE (rn, re) {
- json_prefix = json_object_new_array();
vty_show_ip_route(vty, rn, re, json_prefix);
- prefix2str(&rn->p, buf, sizeof buf);
- json_object_object_add(json, buf, json_prefix);
- json_prefix = NULL;
}
+ prefix2str(&rn->p, buf, sizeof(buf));
+ json_object_object_add(json, buf, json_prefix);
vty_out(vty, "%s\n", json_object_to_json_string_ext(
json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);