diff --git a/net/core/filter.c b/net/core/filter.c index 8c2411fb250902a8cdfb95cfadb1715692b29a82..3400c7abda1352d529b0a9c65cc9aaf6dca009fb 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4001,7 +4001,7 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, /* Only some options are supported */ switch (optname) { case TCP_BPF_IW: - if (val <= 0 || tp->data_segs_out > 0) + if (val <= 0 || tp->data_segs_out > tp->syn_data) ret = -EINVAL; else tp->snd_cwnd = val;