Skip to content

Commit 963f223

Browse files
matttbegregkh
authored andcommitted
mptcp: reset blackhole on success with non-loopback ifaces
[ Upstream commit 833d431 ] 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 893c49a ("mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable()."), see [1]. Fixes: 27069e7 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ad16235 commit 963f223

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mptcp/ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ void mptcp_active_enable(struct sock *sk)
387387
rcu_read_lock();
388388
dst = __sk_dst_get(sk);
389389
dev = dst ? dst_dev_rcu(dst) : NULL;
390-
if (dev && (dev->flags & IFF_LOOPBACK))
390+
if (!(dev && (dev->flags & IFF_LOOPBACK)))
391391
atomic_set(&pernet->active_disable_times, 0);
392392
rcu_read_unlock();
393393
}

0 commit comments

Comments
 (0)