From: heasley Date: Mon, 12 Sep 2011 09:27:52 +0000 (+0400) Subject: bgpd: add useful notification logs (BZ#616) X-Git-Tag: frr-2.0-rc1~2043 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1212dc1961e81d5ef6e576b854e979ea29284f51;p=mirror%2Ffrr.git bgpd: add useful notification logs (BZ#616) * bgp_packet.c * bgp_notify_send_with_data(): add calls to zlog_info() --- diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 1d9fcc971d..2623cc292c 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -895,12 +895,25 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code, if (sub_code != BGP_NOTIFY_CEASE_CONFIG_CHANGE) { if (sub_code == BGP_NOTIFY_CEASE_ADMIN_RESET) - peer->last_reset = PEER_DOWN_USER_RESET; + { + peer->last_reset = PEER_DOWN_USER_RESET; + zlog_info ("Notification sent to neighbor %s: User reset", peer->host); + } else if (sub_code == BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN) - peer->last_reset = PEER_DOWN_USER_SHUTDOWN; + { + peer->last_reset = PEER_DOWN_USER_SHUTDOWN; + zlog_info ("Notification sent to neighbor %s: shutdown", peer->host); + } else - peer->last_reset = PEER_DOWN_NOTIFY_SEND; + { + peer->last_reset = PEER_DOWN_NOTIFY_SEND; + zlog_info ("Notification sent to neighbor %s: type %u/%u", + peer->host, code, sub_code); + } } + else + zlog_info ("Notification sent to neighbor %s: configuration change", + peer->host); /* Call imidiately. */ BGP_WRITE_OFF (peer->t_write);