All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Krystad <peter.krystad at linux.intel.com>
To: mptcp at lists.01.org
Subject: [MPTCP] [PATCH v3 06/10] Fix return value if no DSS option is created.
Date: Wed, 07 Aug 2019 15:44:30 -0700	[thread overview]
Message-ID: <20190807224434.2829-7-peter.krystad@linux.intel.com> (raw)
In-Reply-To: 20190807224434.2829-1-peter.krystad@linux.intel.com

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

Strictly speaking mptcp_established_options_dss() should
return false if no DSS option is created.

squashto: Write MPTCP DSS headers to outgoing data packets

Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/options.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1f54c543304e..01f59ad629e5 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -400,6 +400,9 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
 		WARN(1, "MPTCP: Ack dropped");
 	}
 
+	if (!dss_size)
+		return false;
+
 	*size = ALIGN(dss_size, 4);
 	return true;
 }
-- 
2.17.2


             reply	other threads:[~2019-08-07 22:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 22:44 Peter Krystad [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-12 19:36 [MPTCP] [PATCH v3 06/10] Fix return value if no DSS option is created Matthieu Baerts

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=20190807224434.2829-7-peter.krystad@linux.intel.com \
    --to=unknown@example.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.