<html><head></head><body><div dir="auto">Hello Ze Xia,<br><br>this looks like a real bug, yet I'm not sure whether we happen to observe it in real world often. Please, do you have any instructions how to trigger it reliably so that we can add it to our CI?<br><br>Thanks,<br>Maria<br></div><br><br><div class="gmail_quote"><div dir="auto">On October 17, 2025 3:43:26 PM GMT+02:00, Ze Xia <billxia135@gmail.com> wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><div dir="auto">BGP connect retry timer is unconditionally started in bgp_connect(),<br>which will be stopped by bgp_send_open() in bgp_connected() with<br>successful connection. However, if the sk_connect() in sk_open()<br>immediately succeeds, this code path will be immediately called.<br>This happens before the timer is even started, thus the timer will<br>never be stopped again.<br><br>Signed-off-by: Ze Xia <billxia135@gmail.com><hr> proto/bgp/bgp.c | 6 ++++--<br> 1 file changed, 4 insertions(+), 2 deletions(-)<br><br>diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c<br>index ad51e626..6358afc6 100644<br>--- a/proto/bgp/bgp.c<br>+++ b/proto/bgp/bgp.c<br>@@ -1628,8 +1628,10 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c<br> s->ao_keys_num = 0;<br> s->ao_keys_init = NULL;<br> <br>- DBG("BGP: Waiting for connect success\n");<br>- bgp_start_timer(conn->connect_timer, p->cf->connect_retry_time);<br>+ if (s->type == SK_TCP_ACTIVE) {<br>+ DBG("BGP: Waiting for connect success\n");<br>+ bgp_start_timer(p, conn->connect_timer, p->cf->connect_retry_time);<br>+ }<br> return;<br> <br> err:<br></div></pre></blockquote></div><div dir="auto"><div class='k9mail-signature'>-- <br>Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.</div></div></body></html>