mptcp: Fixes for 5.17
Subsystems (5)
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
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
--- tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
@@ -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
PATCH 2/2 mptcp: netlink: process IPv6 addrs in creating listening sockets
In reply to Mat MartineauFrom: 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).
--- net/mptcp/pm_netlink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/mptcp/pm_netlink.c +6 -2
@@ -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
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_JOINrequests.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