From: Peter Krystad <peter.krystad at linux.intel.com>
To: mptcp at lists.01.org
Subject: [MPTCP] [PATCH 1/3] mptcp: fix mistake in path manager interface
Date: Mon, 21 Oct 2019 16:41:50 -0700 [thread overview]
Message-ID: <20191021234152.3091-2-peter.krystad@linux.intel.com> (raw)
In-Reply-To: 20191021234152.3091-1-peter.krystad@linux.intel.com
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
Do not de-reference NULL pointer immediately after confirming it
is NULL.
squashto: Implement path manager interface commands
Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
---
net/mptcp/pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index f521bf0c5f69..d45406bc3f6c 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -95,7 +95,7 @@ int mptcp_pm_create_subflow(u32 token, u8 remote_id, struct in_addr *addr)
local.sin_family = AF_INET;
local.sin_port = 0;
- if (!addr)
+ if (addr)
local.sin_addr = *addr;
else
local.sin_addr.s_addr = htonl(INADDR_ANY);
@@ -133,7 +133,7 @@ int mptcp_pm_create_subflow6(u32 token, u8 remote_id, struct in6_addr *addr)
local.sin6_family = AF_INET6;
local.sin6_port = 0;
- if (!addr)
+ if (addr)
local.sin6_addr = *addr;
else
local.sin6_addr = in6addr_any;
--
2.17.2
reply other threads:[~2019-10-21 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191021234152.3091-2-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.