From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.12.y 8/8] mptcp: reset blackhole on success with non-loopback ifaces
Date: Mon, 20 Oct 2025 11:44:09 -0400 [thread overview]
Message-ID: <20251020154409.1823664-8-sashal@kernel.org> (raw)
In-Reply-To: <20251020154409.1823664-1-sashal@kernel.org>
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
[ Upstream commit 833d4313bc1e9e194814917d23e8874d6b651649 ]
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>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250918-net-next-mptcp-blackhole-reset-loopback-v1-1-bf5818326639@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 9e1f61b02a66e..0d60556cfefab 100644
--- a/net/mptcp/ctrl.c
+++ b/net/mptcp/ctrl.c
@@ -387,7 +387,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();
}
--
2.51.0
next prev parent reply other threads:[~2025-10-20 15:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 13:20 FAILED: patch "[PATCH] mptcp: reset blackhole on success with non-loopback ifaces" failed to apply to 6.12-stable tree gregkh
2025-10-20 15:44 ` [PATCH 6.12.y 1/8] tcp: convert to dev_net_rcu() Sasha Levin
2025-10-20 15:44 ` [PATCH 6.12.y 2/8] tcp: cache RTAX_QUICKACK metric in a hot cache line Sasha Levin
2025-10-20 15:44 ` [PATCH 6.12.y 3/8] net: dst: add four helpers to annotate data-races around dst->dev Sasha Levin
2025-10-20 15:44 ` [PATCH 6.12.y 4/8] ipv4: adopt dst_dev, skb_dst_dev and skb_dst_dev_net[_rcu] Sasha Levin
2025-10-20 15:44 ` [PATCH 6.12.y 5/8] net: Add locking to protect skb->dev access in ip_output Sasha Levin
2025-10-20 15:44 ` [PATCH 6.12.y 6/8] mptcp: Call dst_release() in mptcp_active_enable() Sasha Levin
2025-10-20 15:44 ` [PATCH 6.12.y 7/8] mptcp: Use __sk_dst_get() and dst_dev_rcu() " Sasha Levin
2025-10-20 15:44 ` Sasha Levin [this message]
2025-10-20 16:25 ` [PATCH 6.12.y 8/8] mptcp: reset blackhole on success with non-loopback ifaces Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251020154409.1823664-8-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=matttbe@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).