Re: [PATCH net v3 2/2] tcp: accecn: initialize AccECN fields in syncookie path

From: Thaison Phan

Date: Wed Nov 18 2026 - 15:16:43 EST


On Wed, Nov 18, 2026 at 12:47:28PM +0000, sashiko-bot@xxxxxxxxxx wrote:
> [Severity: Medium]
> Does the syncookie path leave tp->saw_accecn_opt stuck at
> TCP_ACCECN_OPT_NOT_SEEN when the peer includes an AccECN option on the
> third ACK?
>
> In the normal SYN-RECV path, tcp_check_req() calls tcp_accecn_option_init()
> on the third ACK to update treq->saw_accecn_opt and treq->accecn_fail_mode
> before tcp_ecn_openreq_child() copies them to the child socket. The
> syncookie path bypasses tcp_check_req(), and when tcp_child_process() later
> runs tcp_rcv_state_process() -> tcp_ack() on that third ACK, neither
> FLAG_FORWARD_PROGRESS nor FLAG_TS_PROGRESS is set, so
> __tcp_accecn_process() returns before calling tcp_accecn_process_option().

Agreed, this is a valid observation, though it is pre-existing missing
functionality in syncookie AccECN option handling rather than something
introduced by this patch. Per Eric's guidance on v2 [1], we will leave 3rd
ACK AccECN option initialization for a separate follow-up patch rather than
growing this fix series.

Marking v3 as changes-requested as I am sending v4 to guard the syn_ect_snt
update with !req->syncookie for the BPF custom syncookie path.

[1] https://lore.kernel.org/netdev/CAL4Wiir50_Z+m00GyU9BpRdAqgXs8V-L0S8kmmES=JiYyt==gg@xxxxxxxxxxxxxx/

pw-bot: cr