summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2016-11-16 16:33:35 +0100
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-11-16 16:33:35 +0100
commite08ac8b7afa03ca235434f8407f4c37d49de8a3a (patch)
treea28ca090bacd984bf4aefa343784fe5d1e917940 /bgpd
parentbgpd: 'show ip bgp neighbor json' some keys are in the wrong place (diff)
downloadfrr-e08ac8b7afa03ca235434f8407f4c37d49de8a3a.tar.xz
frr-e08ac8b7afa03ca235434f8407f4c37d49de8a3a.zip
bgpd: 'show ip bgp neighbor json' some keys are in the wrong place
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Sam Tannous <stannous@cumulusnetworks.com> Ticket: CM-13511
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_vty.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 47fcae5c5..aff1aabe0 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -12388,8 +12388,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (use_json)
{
json_object_object_add(json_neigh, "addressFamilyInfo", json_hold);
- json_object_int_add(json, "connectionsEstablished", p->established);
- json_object_int_add(json, "connectionsDropped", p->dropped);
+ json_object_int_add(json_neigh, "connectionsEstablished", p->established);
+ json_object_int_add(json_neigh, "connectionsDropped", p->dropped);
}
else
vty_out (vty, " Connections established %d; dropped %d%s", p->established, p->dropped,
@@ -12398,7 +12398,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (! p->last_reset)
{
if (use_json)
- json_object_string_add(json, "lastReset", "never");
+ json_object_string_add(json_neigh, "lastReset", "never");
else
vty_out (vty, " Last reset never%s", VTY_NEWLINE);
}
@@ -12412,13 +12412,13 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
uptime = bgp_clock();
uptime -= p->resettime;
tm = gmtime(&uptime);
- json_object_int_add(json, "lastResetTimerMsecs", (tm->tm_sec * 1000) + (tm->tm_min * 60000) + (tm->tm_hour * 3600000));
- json_object_string_add(json, "lastResetDueTo", peer_down_str[(int) p->last_reset]);
+ json_object_int_add(json_neigh, "lastResetTimerMsecs", (tm->tm_sec * 1000) + (tm->tm_min * 60000) + (tm->tm_hour * 3600000));
+ json_object_string_add(json_neigh, "lastResetDueTo", peer_down_str[(int) p->last_reset]);
if (p->last_reset_cause_size)
{
char errorcodesubcode_hexstr[5];
sprintf(errorcodesubcode_hexstr, "%02X%02X", p->notify.code, p->notify.subcode);
- json_object_string_add(json, "lastErrorCodeSubcode", errorcodesubcode_hexstr);
+ json_object_string_add(json_neigh, "lastErrorCodeSubcode", errorcodesubcode_hexstr);
}
}
else
@@ -12469,7 +12469,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
if (CHECK_FLAG (p->sflags, PEER_STATUS_PREFIX_OVERFLOW))
{
if (use_json)
- json_object_boolean_true_add(json, "prefixesConfigExceedMax");
+ json_object_boolean_true_add(json_neigh, "prefixesConfigExceedMax");
else
vty_out (vty, " Peer had exceeded the max. no. of prefixes configured.%s", VTY_NEWLINE);
@@ -12477,8 +12477,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
{
if (use_json)
{
- json_object_boolean_true_add(json, "reducePrefixNumFrom");
- json_object_int_add(json, "restartInTimerMsec", thread_timer_remain_second (p->t_pmax_restart) * 1000);
+ json_object_boolean_true_add(json_neigh, "reducePrefixNumFrom");
+ json_object_int_add(json_neigh, "restartInTimerMsec", thread_timer_remain_second (p->t_pmax_restart) * 1000);
}
else
vty_out (vty, " Reduce the no. of prefix from %s, will restart in %ld seconds%s",
@@ -12488,7 +12488,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
else
{
if (use_json)
- json_object_boolean_true_add(json, "reducePrefixNumAndClearIpBgp");
+ json_object_boolean_true_add(json_neigh, "reducePrefixNumAndClearIpBgp");
else
vty_out (vty, " Reduce the no. of prefix and clear ip bgp %s to restore peering%s",
p->host, VTY_NEWLINE);