mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
mptcp: infinite mapping receiving
This patch adds the infinite mapping receiving logic. When the infinite mapping is received, set the map_data_len of the subflow to 0. In subflow_check_data_avail(), only reset the subflow when the map_data_len of the subflow is non-zero. Suggested-by: Paolo Abeni <[email protected]> Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
1e39e5a32a
commit
f8d4bcacff
1 file changed
+3
-1
+3
-1
@@ -1006,7 +1006,9 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
|
||||
|
||||
data_len = mpext->data_len;
|
||||
if (data_len == 0) {
|
||||
pr_debug("infinite mapping received");
|
||||
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_INFINITEMAPRX);
|
||||
subflow->map_data_len = 0;
|
||||
return MAPPING_INVALID;
|
||||
}
|
||||
|
||||
@@ -1220,7 +1222,7 @@ fallback:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (subflow->mp_join || subflow->fully_established) {
|
||||
if ((subflow->mp_join || subflow->fully_established) && subflow->map_data_len) {
|
||||
/* fatal protocol error, close the socket.
|
||||
* subflow_error_report() will introduce the appropriate barriers
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user