All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] mptcp: Fixes for 5.17
@ 2022-02-10  1:25 Mat Martineau
  2022-02-10  1:25 ` [PATCH net 1/2] selftests: mptcp: add missing join check Mat Martineau
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mat Martineau @ 2022-02-10  1:25 UTC (permalink / raw)
  To: netdev; +Cc: Mat Martineau, davem, kuba, matthieu.baerts, mptcp

Patch 1 fixes a MPTCP selftest bug that combined the results of two
separate tests in the test output.

Patch 2 fixes a problem where advertised IPv6 addresses were not actually
available for incoming MP_JOIN requests.

Kishen Maloor (1):
  mptcp: netlink: process IPv6 addrs in creating listening sockets

Matthieu Baerts (1):
  selftests: mptcp: add missing join check

 net/mptcp/pm_netlink.c                          | 8 ++++++--
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)


base-commit: 3bed06e36994661a75bae6a289926e566b9b3c1a
-- 
2.35.1


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

* [PATCH net 1/2] selftests: mptcp: add missing join check
  2022-02-10  1:25 [PATCH net 0/2] mptcp: Fixes for 5.17 Mat Martineau
@ 2022-02-10  1:25 ` Mat Martineau
  2022-02-10  1:25 ` [PATCH net 2/2] mptcp: netlink: process IPv6 addrs in creating listening sockets Mat Martineau
  2022-02-10  5:50 ` [PATCH net 0/2] mptcp: Fixes for 5.17 patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Mat Martineau @ 2022-02-10  1:25 UTC (permalink / raw)
  To: netdev
  Cc: Matthieu Baerts, davem, kuba, liyonglong, mptcp, Paolo Abeni,
	Mat Martineau

From: Matthieu Baerts <matthieu.baerts@tessares.net>

This function also writes the name of the test with its ID, making clear
a new test has been executed.

Without that, the ADD_ADDR results from this test was appended at the
end of the previous test causing confusions. Especially when the second
test was failing, we had:

  17 signal invalid addresses     syn[ ok ] - synack[ ok ] - ack[ ok ]
                                  add[ ok ] - echo  [ ok ]
                                  add[fail] got 2 ADD_ADDR[s] expected 3

In fact, this 17th test was OK but not the 18th one.

Now we have:

  17 signal invalid addresses     syn[ ok ] - synack[ ok ] - ack[ ok ]
                                  add[ ok ] - echo  [ ok ]
  18 signal addresses race test   syn[fail] got 2 JOIN[s] syn expected 3
   - synack[fail] got 2 JOIN[s] synack expected
   - ack[fail] got 2 JOIN[s] ack expected 3
                                  add[fail] got 2 ADD_ADDR[s] expected 3

Fixes: 33c563ad28e3 ("selftests: mptcp: add_addr and echo race test")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index b8bdbec0cf69..c0801df15f54 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -1159,6 +1159,7 @@ signal_address_tests()
 	ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags signal
 	ip netns exec $ns2 ./pm_nl_ctl add 10.0.4.2 flags signal
 	run_tests $ns1 $ns2 10.0.1.1
+	chk_join_nr "signal addresses race test" 3 3 3
 
 	# the server will not signal the address terminating
 	# the MPC subflow
-- 
2.35.1


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

* [PATCH net 2/2] mptcp: netlink: process IPv6 addrs in creating listening sockets
  2022-02-10  1:25 [PATCH net 0/2] mptcp: Fixes for 5.17 Mat Martineau
  2022-02-10  1:25 ` [PATCH net 1/2] selftests: mptcp: add missing join check Mat Martineau
@ 2022-02-10  1:25 ` Mat Martineau
  2022-02-10  5:50 ` [PATCH net 0/2] mptcp: Fixes for 5.17 patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Mat Martineau @ 2022-02-10  1:25 UTC (permalink / raw)
  To: netdev
  Cc: Kishen Maloor, davem, kuba, matthieu.baerts, mptcp, stable,
	Geliang Tang, Mat Martineau

From: Kishen Maloor <kishen.maloor@intel.com>

This change updates mptcp_pm_nl_create_listen_socket() to create
listening sockets bound to IPv6 addresses (where IPv6 is supported).

Cc: stable@vger.kernel.org
Fixes: 1729cf186d8a ("mptcp: create the listening socket for new port")
Acked-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
 net/mptcp/pm_netlink.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 782b1d452269..356f596e2032 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -925,6 +925,7 @@ static int mptcp_pm_nl_append_new_local_addr(struct pm_nl_pernet *pernet,
 static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
 					    struct mptcp_pm_addr_entry *entry)
 {
+	int addrlen = sizeof(struct sockaddr_in);
 	struct sockaddr_storage addr;
 	struct mptcp_sock *msk;
 	struct socket *ssock;
@@ -949,8 +950,11 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
 	}
 
 	mptcp_info2sockaddr(&entry->addr, &addr, entry->addr.family);
-	err = kernel_bind(ssock, (struct sockaddr *)&addr,
-			  sizeof(struct sockaddr_in));
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+	if (entry->addr.family == AF_INET6)
+		addrlen = sizeof(struct sockaddr_in6);
+#endif
+	err = kernel_bind(ssock, (struct sockaddr *)&addr, addrlen);
 	if (err) {
 		pr_warn("kernel_bind error, err=%d", err);
 		goto out;
-- 
2.35.1


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

* Re: [PATCH net 0/2] mptcp: Fixes for 5.17
  2022-02-10  1:25 [PATCH net 0/2] mptcp: Fixes for 5.17 Mat Martineau
  2022-02-10  1:25 ` [PATCH net 1/2] selftests: mptcp: add missing join check Mat Martineau
  2022-02-10  1:25 ` [PATCH net 2/2] mptcp: netlink: process IPv6 addrs in creating listening sockets Mat Martineau
@ 2022-02-10  5:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-10  5:50 UTC (permalink / raw)
  To: Mat Martineau; +Cc: netdev, davem, kuba, matthieu.baerts, mptcp

Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  9 Feb 2022 17:25:06 -0800 you wrote:
> Patch 1 fixes a MPTCP selftest bug that combined the results of two
> separate tests in the test output.
> 
> Patch 2 fixes a problem where advertised IPv6 addresses were not actually
> available for incoming MP_JOIN requests.
> 
> Kishen Maloor (1):
>   mptcp: netlink: process IPv6 addrs in creating listening sockets
> 
> [...]

Here is the summary with links:
  - [net,1/2] selftests: mptcp: add missing join check
    https://git.kernel.org/netdev/net/c/857898eb4b28
  - [net,2/2] mptcp: netlink: process IPv6 addrs in creating listening sockets
    https://git.kernel.org/netdev/net/c/029744cd4bc6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-02-10  5:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  1:25 [PATCH net 0/2] mptcp: Fixes for 5.17 Mat Martineau
2022-02-10  1:25 ` [PATCH net 1/2] selftests: mptcp: add missing join check Mat Martineau
2022-02-10  1:25 ` [PATCH net 2/2] mptcp: netlink: process IPv6 addrs in creating listening sockets Mat Martineau
2022-02-10  5:50 ` [PATCH net 0/2] mptcp: Fixes for 5.17 patchwork-bot+netdevbpf

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.