Skip to content

Commit 14dbad3

Browse files
matttbeintel-lab-lkp
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. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 3aced73 commit 14dbad3

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
@@ -1198,6 +1198,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
11981198
pr_debug("TCP fallback already done (msk=%p)\n", msk);
11991199
return;
12001200
}
1201+
if (WARN_ON_ONCE(!READ_ONCE(msk->allow_infinite_fallback)))
1202+
return;
12011203
set_bit(MPTCP_FALLBACK_DONE, &msk->flags);
12021204
}
12031205

0 commit comments

Comments
 (0)