We should be sending R=1 if update-delay is currently inhibiting
processing of updates at our end.

Untested.

Not-signed-off-by: David Lamparter <[email protected]>
---
 bgpd/bgp_open.c |  2 +-
 bgpd/bgpd.c     | 17 -----------------
 bgpd/bgpd.h     |  2 --
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index cb7d1e0..6df53d5 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -1032,7 +1032,7 @@ bgp_open_capability (struct stream *s, struct peer *peer)
   rcapp = stream_get_endp (s);          /* Set Restart Capability Len Pointer 
*/
   stream_putc (s, 0);
   restart_time = peer->bgp->restart_time;
-  if (peer->bgp->t_startup)
+  if (bgp_update_delay_active (peer->bgp))
     {
       SET_FLAG (restart_time, RESTART_R_BIT);
     }
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index ae24dd3..70a64c9 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -1927,18 +1927,6 @@ peer_group_unbind (struct bgp *bgp, struct peer *peer,
   return 0;
 }
 
-
-static int
-bgp_startup_timer_expire (struct thread *thread)
-{
-  struct bgp *bgp;
-
-  bgp = THREAD_ARG (thread);
-  bgp->t_startup = NULL;
-
-  return 0;
-}
-
 /* BGP instance creation by `router bgp' commands. */
 static struct bgp *
 bgp_create (as_t *as, const char *name)
@@ -1985,9 +1973,6 @@ bgp_create (as_t *as, const char *name)
   if (name)
     bgp->name = strdup (name);
 
-  THREAD_TIMER_ON (master, bgp->t_startup, bgp_startup_timer_expire,
-                   bgp, bgp->restart_time);
-
   return bgp;
 }
 
@@ -2104,8 +2089,6 @@ bgp_delete (struct bgp *bgp)
   afi_t afi;
   int i;
 
-  THREAD_OFF (bgp->t_startup);
-
   /* Delete static route. */
   bgp_static_delete (bgp);
 
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 1586108..c0e4b2e 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -104,8 +104,6 @@ struct bgp
   as_t *confed_peers;
   int confed_peers_cnt;
 
-  struct thread *t_startup;
-
   /* BGP update delay on startup */
   struct thread *t_update_delay;
   struct thread *t_establish_wait;
-- 
2.0.4


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to