summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_fsm.c3
-rw-r--r--bgpd/bgp_io.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index b97bebd7bb..9e58e466e1 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -139,6 +139,7 @@ static struct peer *peer_xfer_conn(struct peer *from_peer)
BGP_TIMER_OFF(from_peer->t_connect);
BGP_TIMER_OFF(from_peer->t_connect_check_r);
BGP_TIMER_OFF(from_peer->t_connect_check_w);
+ BGP_TIMER_OFF(from_peer->t_process_packet);
/*
* At this point in time, it is possible that there are packets pending
@@ -265,6 +266,8 @@ static struct peer *peer_xfer_conn(struct peer *from_peer)
bgp_reads_on(peer);
bgp_writes_on(peer);
+ thread_add_timer_msec(bm->master, bgp_process_packet, peer, 0,
+ &peer->t_process_packet);
if (from_peer)
peer_xfer_stats(peer, from_peer);
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c
index 80e7f13dab..807f577a2d 100644
--- a/bgpd/bgp_io.c
+++ b/bgpd/bgp_io.c
@@ -344,8 +344,8 @@ static int bgp_process_reads(struct thread *thread)
thread_add_read(fpt->master, bgp_process_reads, peer, peer->fd,
&peer->t_read);
if (added_pkt)
- thread_add_event(bm->master, bgp_process_packet, peer,
- 0, NULL);
+ thread_add_timer_msec(bm->master, bgp_process_packet,
+ peer, 0, &peer->t_process_packet);
}
return 0;