Skip to content

Commit db75a16

Browse files
matttbekuba-moo
authored andcommitted
mptcp: safety check before fallback
Recently, some fallback have been initiated, while the connection was not supposed to fallback. Add a safety check with a warning to detect when an wrong attempt to fallback is being done. This should help detecting any future issues quicker. Acked-by: Paolo Abeni <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8668860 commit db75a16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/mptcp/protocol.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
11991199
pr_debug("TCP fallback already done (msk=%p)\n", msk);
12001200
return;
12011201
}
1202+
if (WARN_ON_ONCE(!READ_ONCE(msk->allow_infinite_fallback)))
1203+
return;
12021204
set_bit(MPTCP_FALLBACK_DONE, &msk->flags);
12031205
}
12041206

0 commit comments

Comments
 (0)