diff options
Diffstat (limited to 'bgpd/bgp_debug.c')
| -rw-r--r-- | bgpd/bgp_debug.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 49003e9428..0993d6de57 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -49,6 +49,7 @@ #include "bgpd/bgp_evpn_vty.h" #include "bgpd/bgp_vty.h" #include "bgpd/bgp_flowspec.h" +#include "bgpd/bgp_packet.h" unsigned long conf_bgp_debug_as4; unsigned long conf_bgp_debug_neighbor_events; @@ -168,6 +169,7 @@ static const struct message bgp_notify_cease_msg[] = { {BGP_NOTIFY_CEASE_COLLISION_RESOLUTION, "/Connection Collision Resolution"}, {BGP_NOTIFY_CEASE_OUT_OF_RESOURCE, "/Out of Resources"}, + {BGP_NOTIFY_CEASE_HARD_RESET, "/Hard Reset"}, {0}}; static const struct message bgp_notify_route_refresh_msg[] = { @@ -520,7 +522,7 @@ const char *bgp_notify_admin_message(char *buf, size_t bufsz, uint8_t *data, /* dump notify packet */ void bgp_notify_print(struct peer *peer, struct bgp_notify *bgp_notify, - const char *direct) + const char *direct, bool hard_reset) { const char *subcode_str; const char *code_str; @@ -544,7 +546,8 @@ void bgp_notify_print(struct peer *peer, struct bgp_notify *bgp_notify, if (msg_str) { zlog_info( - "%%NOTIFICATION: %s neighbor %s %d/%d (%s%s) \"%s\"", + "%%NOTIFICATION%s: %s neighbor %s %d/%d (%s%s) \"%s\"", + hard_reset ? "(Hard Reset)" : "", strcmp(direct, "received") == 0 ? "received from" : "sent to", @@ -554,7 +557,8 @@ void bgp_notify_print(struct peer *peer, struct bgp_notify *bgp_notify, } else { msg_str = bgp_notify->data ? bgp_notify->data : ""; zlog_info( - "%%NOTIFICATION: %s neighbor %s %d/%d (%s%s) %d bytes %s", + "%%NOTIFICATION%s: %s neighbor %s %d/%d (%s%s) %d bytes %s", + hard_reset ? "(Hard Reset)" : "", strcmp(direct, "received") == 0 ? "received from" : "sent to", |
