Skip to content

Commit

Permalink
mptcp: do not set unconditionally csum_reqd on incoming opt
Browse files Browse the repository at this point in the history
Should be set only if the ingress packets present it, otherwise
we can confuse csum validation.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paolo Abeni authored and David S. Miller committed Aug 27, 2021
1 parent 3aa7857 commit 8d548ea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/mptcp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ void mptcp_get_options(const struct sock *sk,
const struct sk_buff *skb,
struct mptcp_options_received *mp_opt)
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
struct mptcp_sock *msk = mptcp_sk(subflow->conn);
const struct tcphdr *th = tcp_hdr(skb);
const unsigned char *ptr;
int length;
Expand All @@ -372,7 +370,7 @@ void mptcp_get_options(const struct sock *sk,
mp_opt->dss = 0;
mp_opt->mp_prio = 0;
mp_opt->reset = 0;
mp_opt->csum_reqd = READ_ONCE(msk->csum_enabled);
mp_opt->csum_reqd = 0;
mp_opt->deny_join_id0 = 0;
mp_opt->mp_fail = 0;

Expand Down

0 comments on commit 8d548ea

Please sign in to comment.