diff options
author | paul <paul> | 2003-08-13 00:32:49 +0000 |
---|---|---|
committer | paul <paul> | 2003-08-13 00:32:49 +0000 |
commit | 848973c71e75424d07c2cd52ba991aae1b9df12a (patch) | |
tree | 0a46f5b0fea868dd2003a475d860108b14786fe1 /bgpd/bgp_fsm.c | |
parent | e8f2984c00d406781eff42db7afcdae5d5a6a366 (diff) |
2003-08-13 kunihiro <kunihiro@zebra.org>
* bgpd/bgp{_fsm.c,_vty.c,d.c,d.h}: Add support for "bgp
log-neighbor-changes" command.
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r-- | bgpd/bgp_fsm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 64a4c1bd..3d8e9576 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -322,6 +322,14 @@ bgp_stop (struct peer *peer) established = 1; peer->dropped++; bgp_fsm_change_status (peer, Idle); + + /* bgp log-neighbor-changes of neighbor Down */ + if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) + zlog_info ("%%ADJCHANGE: neighbor %s Down", peer->host); + + /* set last reset time */ + peer->resettime = time (NULL); + #ifdef HAVE_SNMP bgpTrapBackwardTransition (peer); #endif /* HAVE_SNMP */ @@ -629,6 +637,11 @@ bgp_establish (struct peer *peer) /* Increment established count. */ peer->established++; bgp_fsm_change_status (peer, Established); + + /* bgp log-neighbor-changes of neighbor Up */ + if (bgp_flag_check (peer->bgp, BGP_FLAG_LOG_NEIGHBOR_CHANGES)) + zlog_info ("%%ADJCHANGE: neighbor %s Up", peer->host); + #ifdef HAVE_SNMP bgpTrapEstablished (peer); #endif /* HAVE_SNMP */ |