All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "mptcp: netlink: allow userspace-driven subflow establishment"
@ 2022-04-15 16:28 Matthieu Baerts
  2022-04-15 18:05 ` Squash to "mptcp: netlink: allow userspace-driven subflow establishment": Tests Results MPTCP CI
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts @ 2022-04-15 16:28 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts

Fix a compilation warning without CONFIG_IPV6 but with CONFIG_MPTCP:

  net/mptcp/pm_userspace.c: In function 'mptcp_nl_find_ssk':
  net/mptcp/pm_userspace.c:309:28: error: unused variable 'pinfo' [-Werror=unused-variable]
    309 |   const struct ipv6_pinfo *pinfo;
        |                            ^~~~~

Reported by the CI:

  https://github.com/multipath-tcp/mptcp_net-next/runs/6039191808?check_suite_focus=true#step%3A6%3A10367=

That's a shame these warnings were ignored :)

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---

Notes:
    to be squashed in "mptcp: netlink: allow userspace-driven subflow establishment"

 net/mptcp/pm_userspace.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 735ff7ff71af..fce61530fe9e 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -306,7 +306,6 @@ static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,
 	lock_sock(sk);
 
 	mptcp_for_each_subflow(msk, subflow) {
-		const struct ipv6_pinfo *pinfo;
 		const struct inet_sock *issk;
 		struct sock *ssk;
 
@@ -324,12 +323,14 @@ static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,
 				continue;
 			break;
 #if IS_ENABLED(CONFIG_MPTCP_IPV6)
-		case AF_INET6:
-			pinfo = inet6_sk(ssk);
+		case AF_INET6: {
+			const struct ipv6_pinfo *pinfo = inet6_sk(ssk);
+
 			if (!ipv6_addr_equal(&local->addr6, &pinfo->saddr) ||
 			    !ipv6_addr_equal(&remote->addr6, &ssk->sk_v6_daddr))
 				continue;
 			break;
+		}
 #endif
 		default:
 			continue;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-15 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 16:28 [PATCH mptcp-next] Squash to "mptcp: netlink: allow userspace-driven subflow establishment" Matthieu Baerts
2022-04-15 18:05 ` Squash to "mptcp: netlink: allow userspace-driven subflow establishment": Tests Results MPTCP CI

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.