From 34683f0500fb2f57acad7a8a6eee236dc84c362f Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 17 Jun 2026 15:05:20 +0300 Subject: [PATCH] fix: update last_recv_local_time on INIT packet receive to prevent spurious keepalive timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit last_recv_local_time was not set in the server INIT processing path, causing the keepalive timer to see a stale timestamp and trigger a false link-down → route_bgp_remove_conn() right after reconnect. Routes could be deleted before the first normal packet from the client updated the timestamp via process_decrypted. --- src/etcp_connections.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/etcp_connections.c b/src/etcp_connections.c index d0132785..c50aeee1 100644 --- a/src/etcp_connections.c +++ b/src/etcp_connections.c @@ -1563,6 +1563,8 @@ void etcp_connections_read_callback_socket(socket_t sock, void* arg) { pkt->noencrypt_len=0; pkt->link=link; link->recv_keepalive = 1; + link->last_recv_local_time = get_time_tb(); + link->last_recv_timestamp = pkt->timestamp; int xoffset=sizeof(*ack_repl_hdr); // padding