Skip to contentSkip to conversation

mptcp: Fixes for 5.17

PATCH Applied Mat Martineau 2 participants 4 messages Feb 10, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover mptcp: Fixes for 5.17

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

Signature · 1 line
2.35.1
#1 lore raw

PATCH 1/2 selftests: mptcp: add missing join check

From: Matthieu Baerts <[email protected]>

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")
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
index b8bdbec0cf69..c0801df15f54 100755
@@ -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
Signature · 1 line
2.35.1
#2 lore raw

PATCH 2/2 mptcp: netlink: process IPv6 addrs in creating listening sockets

In reply to Mat Martineau

From: Kishen Maloor <[email protected]>

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

Fixes 1729cf186d8a ("mptcp: create the listening socket for new port")
---
 net/mptcp/pm_netlink.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
net/mptcp/pm_netlink.c +6 -2
index 782b1d452269..356f596e2032 100644
@@ -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;
Signature · 1 line
2.35.1
#3 lore raw
In reply to Mat Martineau
This series was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html