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.
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 64a4c1b..3d8e957 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -322,6 +322,14 @@
       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 @@
   /* 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 */