🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Matthieu Baerts Tue, 17 Nov 2026 18:06
Re: [PATCH net v3 2/2] tcp: accecn: initialize AccECN fields in syncookie path
#18039
Author: Matthieu Baerts
Date: Tue, 17 Nov 2026 18:06
32 lines
12696 bytes
Hi Thaison,

On 17/11/2026 13:47, Thaison Phan wrote:
> cookie_tcp_reqsk_alloc() and bpf_sk_assign_tcp_reqsk() allocate struct
> request_sock without __GFP_ZERO, leaving saw_accecn_opt,
> accecn_fail_mode, syn_ect_rcv, and syn_ect_snt uninitialized. When
> accecn_ok is negotiated in cookie_{v4,v6}_check(),
> tcp_ecn_openreq_child() reads all four fields to initialize the child
> socket's AccECN state.
> 
> In addition, because the temporary request_sock used to send a cookie
> SYN-ACK is immediately freed, treq->syn_ect_snt is lost. For AccECN
> connections where the listener marks ECT on the SYN-ACK, leaving
> syn_ect_snt as 0 causes tcp_accecn_third_ack() to see a mismatch between
> the expected Not-ECT and the peer's reflected ECT in the ACE field,
> erroneously flagging TCP_ACCECN_ACE_FAIL_RECV in accecn_fail_mode. Refer
> to Table 4 of RFC 9768 for more details.
> 
> Initialize saw_accecn_opt, accecn_fail_mode, and syn_ect_rcv in
> cookie_tcp_reqsk_init() to match tcp_openreq_init(), and set syn_ect_snt
> from the listener's TOS/tclass in cookie_{v4,v6}_check() to match
> tcp_{v4,v6}_send_synack().

I missed the v3:

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads