mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 4/4] mptcp: avoid processing packet if a subflow reset
@ 2021-06-10  9:28 Jianguo Wu
  2021-06-10 10:22 ` Paolo Abeni
  0 siblings, 1 reply; 2+ messages in thread
From: Jianguo Wu @ 2021-06-10  9:28 UTC (permalink / raw)
  To: mptcp

From: Jianguo Wu <wujianguo@chinatelecom.cn>

If check_fully_established() causes a subflow reset, it should not
continue to process the packet in tcp_data_queue().

setting:
	TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;

so that the following check will drop the pkt in
tcp_data_queue():
  if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) {
	__kfree_skb(skb);
	return;
  }

Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>
---
 net/mptcp/options.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1aec016..01a1bf6 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -926,6 +926,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
 	return true;

 reset:
+	TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;
+
 	mptcp_subflow_reset(ssk);
 	return false;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 4/4] mptcp: avoid processing packet if a subflow reset
  2021-06-10  9:28 [PATCH v2 4/4] mptcp: avoid processing packet if a subflow reset Jianguo Wu
@ 2021-06-10 10:22 ` Paolo Abeni
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Abeni @ 2021-06-10 10:22 UTC (permalink / raw)
  To: Jianguo Wu, mptcp

On Thu, 2021-06-10 at 17:28 +0800, Jianguo Wu wrote:
> From: Jianguo Wu <wujianguo@chinatelecom.cn>
> 
> If check_fully_established() causes a subflow reset, it should not
> continue to process the packet in tcp_data_queue().
> 
> setting:
> 	TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq;
> 
> so that the following check will drop the pkt in
> tcp_data_queue():
>   if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) {
> 	__kfree_skb(skb);
> 	return;
>   }
> 
> Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>

Here a 'Fixes:' tag will be nice, I think.

Thanks,

Paolo


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-10 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  9:28 [PATCH v2 4/4] mptcp: avoid processing packet if a subflow reset Jianguo Wu
2021-06-10 10:22 ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).