diff options
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgp_vty.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index ae3571e83..547247206 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -8292,6 +8292,20 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js vty_out (vty, "due to NOTIFICATION %s (%s%s)%s", p->last_reset == PEER_DOWN_NOTIFY_SEND ? "sent" : "received", code_str, subcode_str, VTY_NEWLINE); + if (p->last_reset == PEER_DOWN_NOTIFY_RECEIVED + && p->notify.code == BGP_NOTIFY_CEASE + && (p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN + || p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_RESET) + && p->notify.length) + { + char msgbuf[1024]; + const char *msg_str; + + msg_str = bgp_notify_admin_message(msgbuf, sizeof(msgbuf), + (u_char*)p->notify.data, p->notify.length); + if (msg_str) + vty_out (vty, " Message: \"%s\"%s", msg_str, VTY_NEWLINE); + } } else { |