* [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces
@ 2025-09-18 8:50 Matthieu Baerts (NGI0)
2025-09-18 16:18 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-09-18 8:50 UTC (permalink / raw)
To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman
Cc: netdev, mptcp, linux-kernel, stable, Matthieu Baerts (NGI0),
Kuniyuki Iwashima
When a first MPTCP connection gets successfully established after a
blackhole period, 'active_disable_times' was supposed to be reset when
this connection was done via any non-loopback interfaces.
Unfortunately, the opposite condition was checked: only reset when the
connection was established via a loopback interface. Fixing this by
simply looking at the opposite.
This is similar to what is done with TCP FastOpen, see
tcp_fastopen_active_disable_ofo_check().
This patch is a follow-up of a previous discussion linked to commit
893c49a78d9f ("mptcp: Use __sk_dst_get() and dst_dev_rcu() in
mptcp_active_enable()."), see [1].
Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/4209a283-8822-47bd-95b7-87e96d9b7ea3@kernel.org [1]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Note: sending this fix to net-next, similar to commits 108a86c71c93
("mptcp: Call dst_release() in mptcp_active_enable().") and 893c49a78d9f
("mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().").
Also to avoid conflicts, and because we are close to the merge windows.
---
net/mptcp/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c
index e8ffa62ec183f3cd8156e3969ac4a7d0213a990b..d96130e49942e2fb878cd1897ad43c1d420fb233 100644
--- a/net/mptcp/ctrl.c
+++ b/net/mptcp/ctrl.c
@@ -507,7 +507,7 @@ void mptcp_active_enable(struct sock *sk)
rcu_read_lock();
dst = __sk_dst_get(sk);
dev = dst ? dst_dev_rcu(dst) : NULL;
- if (dev && (dev->flags & IFF_LOOPBACK))
+ if (!(dev && (dev->flags & IFF_LOOPBACK)))
atomic_set(&pernet->active_disable_times, 0);
rcu_read_unlock();
}
---
base-commit: b127e355f1af1e4a635ed8f78cb0d11c916613cf
change-id: 20250918-net-next-mptcp-blackhole-reset-loopback-d82c518e409f
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces
2025-09-18 8:50 [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces Matthieu Baerts (NGI0)
@ 2025-09-18 16:18 ` Simon Horman
2025-09-18 18:48 ` Kuniyuki Iwashima
2025-09-19 14:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2025-09-18 16:18 UTC (permalink / raw)
To: Matthieu Baerts (NGI0)
Cc: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, mptcp, linux-kernel, stable,
Kuniyuki Iwashima
On Thu, Sep 18, 2025 at 10:50:18AM +0200, Matthieu Baerts (NGI0) wrote:
> When a first MPTCP connection gets successfully established after a
> blackhole period, 'active_disable_times' was supposed to be reset when
> this connection was done via any non-loopback interfaces.
>
> Unfortunately, the opposite condition was checked: only reset when the
> connection was established via a loopback interface. Fixing this by
> simply looking at the opposite.
>
> This is similar to what is done with TCP FastOpen, see
> tcp_fastopen_active_disable_ofo_check().
>
> This patch is a follow-up of a previous discussion linked to commit
> 893c49a78d9f ("mptcp: Use __sk_dst_get() and dst_dev_rcu() in
> mptcp_active_enable()."), see [1].
>
> Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole")
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/4209a283-8822-47bd-95b7-87e96d9b7ea3@kernel.org [1]
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Note: sending this fix to net-next, similar to commits 108a86c71c93
> ("mptcp: Call dst_release() in mptcp_active_enable().") and 893c49a78d9f
> ("mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().").
> Also to avoid conflicts, and because we are close to the merge windows.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces
2025-09-18 8:50 [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces Matthieu Baerts (NGI0)
2025-09-18 16:18 ` Simon Horman
@ 2025-09-18 18:48 ` Kuniyuki Iwashima
2025-09-19 14:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Kuniyuki Iwashima @ 2025-09-18 18:48 UTC (permalink / raw)
To: Matthieu Baerts (NGI0)
Cc: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, netdev, mptcp,
linux-kernel, stable
On Thu, Sep 18, 2025 at 1:51 AM Matthieu Baerts (NGI0)
<matttbe@kernel.org> wrote:
>
> When a first MPTCP connection gets successfully established after a
> blackhole period, 'active_disable_times' was supposed to be reset when
> this connection was done via any non-loopback interfaces.
>
> Unfortunately, the opposite condition was checked: only reset when the
> connection was established via a loopback interface. Fixing this by
> simply looking at the opposite.
>
> This is similar to what is done with TCP FastOpen, see
> tcp_fastopen_active_disable_ofo_check().
>
> This patch is a follow-up of a previous discussion linked to commit
> 893c49a78d9f ("mptcp: Use __sk_dst_get() and dst_dev_rcu() in
> mptcp_active_enable()."), see [1].
>
> Fixes: 27069e7cb3d1 ("mptcp: disable active MPTCP in case of blackhole")
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/4209a283-8822-47bd-95b7-87e96d9b7ea3@kernel.org [1]
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Note: sending this fix to net-next, similar to commits 108a86c71c93
> ("mptcp: Call dst_release() in mptcp_active_enable().") and 893c49a78d9f
> ("mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().").
> Also to avoid conflicts, and because we are close to the merge windows.
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Thanks for the followup!
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces
2025-09-18 8:50 [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces Matthieu Baerts (NGI0)
2025-09-18 16:18 ` Simon Horman
2025-09-18 18:48 ` Kuniyuki Iwashima
@ 2025-09-19 14:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-19 14:30 UTC (permalink / raw)
To: Matthieu Baerts
Cc: martineau, geliang, davem, edumazet, kuba, pabeni, horms, netdev,
mptcp, linux-kernel, stable, kuniyu
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 18 Sep 2025 10:50:18 +0200 you wrote:
> When a first MPTCP connection gets successfully established after a
> blackhole period, 'active_disable_times' was supposed to be reset when
> this connection was done via any non-loopback interfaces.
>
> Unfortunately, the opposite condition was checked: only reset when the
> connection was established via a loopback interface. Fixing this by
> simply looking at the opposite.
>
> [...]
Here is the summary with links:
- [net-next] mptcp: reset blackhole on success with non-loopback ifaces
https://git.kernel.org/netdev/net-next/c/833d4313bc1e
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:[~2025-09-19 14:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 8:50 [PATCH net-next] mptcp: reset blackhole on success with non-loopback ifaces Matthieu Baerts (NGI0)
2025-09-18 16:18 ` Simon Horman
2025-09-18 18:48 ` Kuniyuki Iwashima
2025-09-19 14:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox