summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_peer.c')
-rw-r--r--bgpd/bgp_peer.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/bgpd/bgp_peer.c b/bgpd/bgp_peer.c
index 2cb58c34..a32f23bc 100644
--- a/bgpd/bgp_peer.c
+++ b/bgpd/bgp_peer.c
@@ -1756,6 +1756,34 @@ bgp_routeadv_timer (struct thread *thread)
return 0;
}
+static int
+bgp_withdraw_event (struct thread *thread)
+{
+ bgp_peer peer ;
+
+ peer = THREAD_ARG (thread);
+ peer->t_withdraw = NULL;
+
+ if (BGP_DEBUG (fsm, FSM))
+ zlog (peer->log, LOG_DEBUG,
+ "%s [FSM] bgp_withdraw_event",
+ peer->host);
+
+ bgp_write(peer, NULL);
+ return 0;
+}
+
+extern void
+bgp_withdraw_schedule(bgp_peer peer)
+{
+ if (peer->t_withdraw == NULL)
+ {
+ /* TODO: replace legacy event use
+ */
+ peer->t_withdraw = thread_add_event(master, bgp_withdraw_event, peer, 0) ;
+ } ;
+} ;
+
/*------------------------------------------------------------------------------
* BGP Peer Down Causes mapped to strings
*/