diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5dfbc333e79a..6660ce2a7333 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -6263,6 +6263,11 @@ static inline void pr_drop_req(struct request_sock *req, __u16 port, int family) | |||
6263 | * congestion control: Linux DCTCP asserts ECT on all packets, | 6263 | * congestion control: Linux DCTCP asserts ECT on all packets, |
6264 | * including SYN, which is most optimal solution; however, | 6264 | * including SYN, which is most optimal solution; however, |
6265 | * others, such as FreeBSD do not. | 6265 | * others, such as FreeBSD do not. |
6266 | * | ||
6267 | * Exception: At least one of the reserved bits of the TCP header (th->res1) is | ||
6268 | * set, indicating the use of a future TCP extension (such as AccECN). See | ||
6269 | * RFC8311 ยง4.3 which updates RFC3168 to allow the development of such | ||
6270 | * extensions. | ||
6266 | */ | 6271 | */ |
6267 | static void tcp_ecn_create_request(struct request_sock *req, | 6272 | static void tcp_ecn_create_request(struct request_sock *req, |
6268 | const struct sk_buff *skb, | 6273 | const struct sk_buff *skb, |
@@ -6282,7 +6287,7 @@ static void tcp_ecn_create_request(struct request_sock *req, | |||
6282 | ecn_ok_dst = dst_feature(dst, DST_FEATURE_ECN_MASK); | 6287 | ecn_ok_dst = dst_feature(dst, DST_FEATURE_ECN_MASK); |
6283 | ecn_ok = net->ipv4.sysctl_tcp_ecn || ecn_ok_dst; | 6288 | ecn_ok = net->ipv4.sysctl_tcp_ecn || ecn_ok_dst; |
6284 | 6289 | ||
6285 | if ((!ect && ecn_ok) || tcp_ca_needs_ecn(listen_sk) || | 6290 | if (((!ect || th->res1) && ecn_ok) || tcp_ca_needs_ecn(listen_sk) || |
6286 | (ecn_ok_dst & DST_FEATURE_ECN_CA) || | 6291 | (ecn_ok_dst & DST_FEATURE_ECN_CA) || |
6287 | tcp_bpf_ca_needs_ecn((struct sock *)req)) | 6292 | tcp_bpf_ca_needs_ecn((struct sock *)req)) |
6288 | inet_rsk(req)->ecn_ok = 1; | 6293 | inet_rsk(req)->ecn_ok = 1; |