mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>,
	Matthieu Baerts <matthieu.baerts@tessares.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Peter Krystad <peter.krystad@linux.intel.com>
Cc: Geliang Tang <geliangtang@gmail.com>,
	netdev@vger.kernel.org, mptcp@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [MPTCP][PATCH net-next 2/2] mptcp: move mptcp_options_received's port initialization
Date: Mon, 19 Oct 2020 18:23:16 +0800	[thread overview]
Message-ID: <0371a529baaaa4796406e4335afb91ef210fa813.1603102503.git.geliangtang@gmail.com> (raw)
In-Reply-To: <3ae4089622f9933c18f474e6ee954f39a40bfec3.1603102503.git.geliangtang@gmail.com>

This patch moved mptcp_options_received's port initialization from
mptcp_parse_option to mptcp_get_options, put it together with the other
fields initializations of mptcp_options_received.

Fixes: 3df523ab582c5 ("mptcp: Add ADD_ADDR handling")
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 net/mptcp/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1ff3469938b6..a044dd43411d 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -241,7 +241,6 @@ static void mptcp_parse_option(const struct sk_buff *skb,
 		}
 
 		mp_opt->add_addr = 1;
-		mp_opt->port = 0;
 		mp_opt->addr_id = *ptr++;
 		pr_debug("ADD_ADDR: id=%d, echo=%d", mp_opt->addr_id, mp_opt->echo);
 		if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) {
@@ -298,6 +297,7 @@ void mptcp_get_options(const struct sk_buff *skb,
 	mp_opt->mp_join = 0;
 	mp_opt->add_addr = 0;
 	mp_opt->ahmac = 0;
+	mp_opt->port = 0;
 	mp_opt->rm_addr = 0;
 	mp_opt->dss = 0;
 
-- 
2.26.2


  reply	other threads:[~2020-10-19 10:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 10:23 [MPTCP][PATCH net-next 0/2] init ahmac and port of mptcp_options_received Geliang Tang
2020-10-19 10:23 ` [MPTCP][PATCH net-next 1/2] mptcp: initialize mptcp_options_received's ahmac Geliang Tang
2020-10-19 10:23   ` Geliang Tang [this message]
2020-10-19 16:27 ` [MPTCP][PATCH net-next 0/2] init ahmac and port of mptcp_options_received Matthieu Baerts
2020-10-19 20:40   ` Jakub Kicinski
2020-10-20 13:18     ` Matthieu Baerts
2020-10-20 23:39 ` Jakub Kicinski
2020-10-21  2:37   ` Geliang Tang

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=0371a529baaaa4796406e4335afb91ef210fa813.1603102503.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.01.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peter.krystad@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®