mptcp: avoid processing packet if a subflow reset
authorJianguo Wu <wujianguo@chinatelecom.cn>
Sat, 10 Jul 2021 00:20:49 +0000 (17:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jul 2021 01:38:53 +0000 (18:38 -0700)
commit6787b7e350d3552651a3422d3d8980fbc8d65368
tree88daa792c9080e57f9834d973dcbb6b253d27bcd
parent8547ea5f52dd8ef19b69c25c41b1415481b3503b
mptcp: avoid processing packet if a subflow reset

If check_fully_established() causes a subflow reset, it should not
continue to process the packet in tcp_data_queue().
Add a return value to mptcp_incoming_options(), and return false if a
subflow has been reset, else return true. Then drop the packet in
tcp_data_queue()/tcp_rcv_state_process() if mptcp_incoming_options()
return false.

Fixes: d582484726c4 ("mptcp: fix fallback for MP_JOIN subflows")
Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/mptcp.h
net/ipv4/tcp_input.c
net/mptcp/options.c