diff options
author | heasley <heas@shrubbery.net> | 2011-09-12 13:27:52 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-09-25 18:13:14 +0400 |
commit | 2e35e96a11ac7bdf82ad68056f94135dc41a0995 (patch) | |
tree | 772b8bd77b742ea01094f9a214775907dca5f1d7 | |
parent | 99dc8691caa8bd1eaf4d5784bdb72a10966f2007 (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.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 1ed23285..5f150600 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -901,12 +901,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 immediately. */ BGP_WRITE_OFF (peer->t_write); |