tcp: AccECN support to tcp_add_backlog
authorIlpo Järvinen <ij@kernel.org>
Wed, 5 Mar 2025 22:38:50 +0000 (23:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Mar 2025 13:55:54 +0000 (13:55 +0000)
AE flag needs to be preserved for AccECN.

Signed-off-by: Ilpo Järvinen <ij@kernel.org>
Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c

index fab6842..87f270e 100644 (file)
@@ -2051,7 +2051,8 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb,
            !((TCP_SKB_CB(tail)->tcp_flags &
              TCP_SKB_CB(skb)->tcp_flags) & TCPHDR_ACK) ||
            ((TCP_SKB_CB(tail)->tcp_flags ^
-             TCP_SKB_CB(skb)->tcp_flags) & (TCPHDR_ECE | TCPHDR_CWR)) ||
+             TCP_SKB_CB(skb)->tcp_flags) &
+            (TCPHDR_ECE | TCPHDR_CWR | TCPHDR_AE)) ||
            !tcp_skb_can_collapse_rx(tail, skb) ||
            thtail->doff != th->doff ||
            memcmp(thtail + 1, th + 1, hdrlen - sizeof(*th)))