From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Cc: max@internet.ru
Subject: [PATCH mptcp-net] mptcp: let warn_bad_map report relevant values
Date: Wed, 26 May 2021 17:25:50 +0200 [thread overview]
Message-ID: <e553550a010387f7ccfafa4010397413b032eef9.1622042688.git.pabeni@redhat.com> (raw)
When the right bound check fails, warn_bad_map() reports
the wrong ssn value, let's fix it.
Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/mptcp/subflow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 6b1cd4257edf..726bc3d083fa 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -821,7 +821,7 @@ static bool validate_mapping(struct sock *ssk, struct sk_buff *skb)
if (unlikely(!before(ssn, subflow->map_subflow_seq +
subflow->map_data_len))) {
/* Mapping does covers past subflow data, invalid */
- warn_bad_map(subflow, ssn + skb->len);
+ warn_bad_map(subflow, ssn);
return false;
}
return true;
--
2.26.3
next reply other threads:[~2021-05-26 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 15:25 Paolo Abeni [this message]
2021-05-26 22:55 ` [PATCH mptcp-net] mptcp: let warn_bad_map report relevant values Mat Martineau
2021-06-03 11:30 ` Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e553550a010387f7ccfafa4010397413b032eef9.1622042688.git.pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=max@internet.ru \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).