Browse Source

fix: update last_recv_local_time on INIT packet receive to prevent spurious keepalive timeout

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.
stcp
Evgeny 4 months ago
parent
commit
34683f0500
  1. 2
      src/etcp_connections.c

2
src/etcp_connections.c

@ -1563,6 +1563,8 @@ void etcp_connections_read_callback_socket(socket_t sock, void* arg) {
pkt->noencrypt_len=0; pkt->noencrypt_len=0;
pkt->link=link; pkt->link=link;
link->recv_keepalive = 1; link->recv_keepalive = 1;
link->last_recv_local_time = get_time_tb();
link->last_recv_timestamp = pkt->timestamp;
int xoffset=sizeof(*ack_repl_hdr); int xoffset=sizeof(*ack_repl_hdr);
// padding // padding

Loading…
Cancel
Save