2004-05-03 Daniel Roesen <dr@cluenet.de>

        * bgp_fsm.c: (bgp_stop) Reset uptime only on transition from
          Established so that it reflects true downtime (rather time
          since last transition, eg Active->Idle)
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 3d8e957..5c8224c 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -329,15 +329,14 @@
 
       /* set last reset time */
       peer->resettime = time (NULL);
+      /* Reset uptime. */
+      bgp_uptime_reset (peer);
 
 #ifdef HAVE_SNMP
       bgpTrapBackwardTransition (peer);
 #endif /* HAVE_SNMP */
     }
 
-  /* Reset uptime. */
-  bgp_uptime_reset (peer);
-
   /* Need of clear of peer. */
   if (established)
     bgp_clear_route_all (peer);