summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheasley <heas@shrubbery.net>2011-09-12 13:27:52 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-09-27 21:07:07 +0400
commit1212dc1961e81d5ef6e576b854e979ea29284f51 (patch)
treebc27c64ae0463c1787d641f2946b3e64f24126d3
parentd68ab1009f42c5ed62f7c6b0b5700f5f0469a35b (diff)
bgpd: add useful notification logs (BZ#616)
* bgp_packet.c * bgp_notify_send_with_data(): add calls to zlog_info()
-rw-r--r--bgpd/bgp_packet.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 1d9fcc97..2623cc29 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);