send MP_FAIL with MP_RST and others
Subsystems (2)
cover send MP_FAIL with MP_RST and others
Two small patches about sending MP_FAIL with MP_RST.
Geliang Tang (2):
mptcp: send MP_FAIL with MP_RST
mptcp: print out reset_reason of MP_RST
net/mptcp/options.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/2 mptcp: send MP_FAIL with MP_RST
As described in RFC8684, 3.7 Fallback:
'''
Therefore, it is not possible to recover the subflow, and the affected subflow must be immediately closed with a RST that includes an MP_FAIL option (Figure 16), which defines the data sequence number at the start of the segment (defined by the Data Sequence Mapping) that had the checksum failure.
'''
MP_FAIL could be sent with MP_RST at the same time.
This patch fixed it.
--- net/mptcp/options.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
net/mptcp/options.c +5 -2
@@ -829,8 +829,11 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,if (unlikely (skb &&TCP_SKB_CB (skb)->tcp_flags &TCPHDR_RST )) {if (mptcp_established_options_fastclose (sk, &opt_size, remaining, opts) || -mptcp_established_options_mp_fail (sk, &opt_size, remaining, opts) || -mptcp_established_options_rst (sk, skb, &opt_size, remaining, opts)) { +mptcp_established_options_mp_fail (sk, &opt_size, remaining, opts)) { + *size += opt_size; + remaining -= opt_size; + } +if (mptcp_established_options_rst (sk, skb, &opt_size, remaining, opts)) { *size += opt_size; remaining -= opt_size; }
Signature · 1 line
2.26.2
PATCH 2/2 mptcp: print out reset_reason of MP_RST
In reply to Geliang TangThis patch printed out the reset_reason of MP_RST in mptcp_parse_option() to show that MP_RST is received.
--- net/mptcp/options.c | 1 + 1 file changed, 1 insertion(+)
net/mptcp/options.c +1 -0
@@ -336,6 +336,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, flags = *ptr++; mp_opt->reset_transient = flags &MPTCP_RST_TRANSIENT ; mp_opt->reset_reason = *ptr; +pr_debug ("MP_RST: reset_reason=%u" , mp_opt->reset_reason);break ;case MPTCPOPT_MP_FAIL :
Signature · 1 line
2.26.2
Re: [PATCH mptcp-next 1/2] mptcp: send MP_FAIL with MP_RST
In reply to Geliang TangHi Geliang,
+cc: Paolo
Quoted 10 lines · Geliang Tang
As described in RFC8684, 3.7 Fallback:
'''
Therefore, it is not possible to recover the subflow, and the affected subflow must be immediately closed with a RST that includes anMP_FAILoption (Figure 16), which defines the data sequence number at the start of the segment (defined by the Data Sequence Mapping) that had the checksum failure.
'''
Quoted 5 lines
MP_FAILcould be sent withMP_RSTat the same time.This patch fixed it.
Fixes c3b546f7292ac ("mptcp: implement fastclose xmit path")
I bugged a bit when looking at your patch because I was not able to see the issue on -net nor net-next. But then I noticed this patch is in fact a Squash-to patch :)
Then good catch to have seen that before upstreaming these patches!
But then, I'm not sure this modification is enough: in mptcp_write_options(), it looks like MP_FASTCLOSE and MP_RST are mutually exclusive, no?
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Re: [PATCH mptcp-next 2/2] mptcp: print out reset_reason of MP_RST
In reply to Geliang TangHi Geliang,
Quoted 2 lines · Geliang Tang
This patch printed out the
reset_reasonofMP_RSTinmptcp_parse_option()to show thatMP_RSTis received.
Thank you for looking at that!
Quoted 10 lines
Signed-off-by Geliang Tang <[email protected]>--- net/mptcp/options.c | 1 + 1 file changed, 1 insertion(+)net/mptcp/options.c +0
-0
net/mptcp/options.c static void mptcp_parse_option(const struct sk_buff *skb, · line 339
Quoted 4 lines
net/mptcp/options.c +1
-0@@ -336,6 +336,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, flags = *ptr++; mp_opt->reset_transient = flags &MPTCP_RST_TRANSIENT ; mp_opt->reset_reason = *ptr; +pr_debug ("MP_RST: reset_reason=%u" , mp_opt->reset_reason);
Should we also print the "transient" bit?
And should we also squash this in "mptcp: implement fastclose xmit path" patch?
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Re: [PATCH mptcp-next 1/2] mptcp: send MP_FAIL with MP_RST
In reply to Matthieu BaertsQuoted 19 lines · Matthieu Baerts
Hi Geliang,
+cc: Paolo
Quoted 14 lines · Geliang Tang
As described in RFC8684, 3.7 Fallback:
'''
Therefore, it is not possible to recover the subflow, and the affected subflow must be immediately closed with a RST that includes anMP_FAILoption (Figure 16), which defines the data sequence number at the start of the segment (defined by the Data Sequence Mapping) that had the checksum failure.
'''
MP_FAILcould be sent withMP_RSTat the same time.This patch fixed it.
Quoted 7 lines
Quoted 1 line
Fixes c3b546f7292ac ("mptcp: implement fastclose xmit path")I bugged a bit when looking at your patch because I was not able to see the issue on -net nor net-next. But then I noticed this patch is in fact a Squash-to patch :)
Then good catch to have seen that before upstreaming these patches!
Updated in v2 as a squash-to patch.
Quoted 4 lines
But then, I'm not sure this modification is enough: in
mptcp_write_options(), it looks likeMP_FASTCLOSEandMP_RSTare mutually exclusive, no?
MP_FAIL can be sent with MP_RST in mptcp_write_options(). So no need to modify the code in mptcp_write_options().
Thanks,
-Geliang
Quoted 7 lines
Cheers,
MattSignature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Re: [PATCH mptcp-next 2/2] mptcp: print out reset_reason of MP_RST
In reply to Matthieu BaertsHi Matt,
Thanks for your review.
Quoted 13 lines · Matthieu Baerts
Hi Geliang,
Quoted 2 lines · Geliang Tang
This patch printed out the
reset_reasonofMP_RSTinmptcp_parse_option()to show thatMP_RSTis received.Thank you for looking at that!
Quoted 5 lines
Signed-off-by Geliang Tang <[email protected]>--- net/mptcp/options.c | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
net/mptcp/options.c static void mptcp_parse_option(const struct sk_buff *skb, · line 339
Quoted 9 lines
net/mptcp/options.c +1
-0@@ -336,6 +336,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, flags = *ptr++; mp_opt->reset_transient = flags &MPTCP_RST_TRANSIENT ; mp_opt->reset_reason = *ptr; +pr_debug ("MP_RST: reset_reason=%u" , mp_opt->reset_reason);Should we also print the "transient" bit?
Updated in v2.
Quoted 2 lines
And should we also squash this in "mptcp: implement fastclose xmit path" patch?
No, I think it's better to keep it as a standalone patch.
Thanks,
-Geliang
Quoted 7 lines
Cheers,
MattSignature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Re: [PATCH mptcp-next 1/2] mptcp: send MP_FAIL with MP_RST
In reply to Geliang TangHi Geliang,
29 Nov 2021 05:12:36 Geliang Tang <[email protected]>:
Quoted 22 lines · Matthieu Baerts
Quoted 21 lines
Hi Geliang,
+cc: Paolo
Quoted 15 lines · Geliang Tang
As described in RFC8684, 3.7 Fallback:
'''
Therefore, it is not possible to recover the subflow, and the affected subflow must be immediately closed with a RST that includes anMP_FAILoption (Figure 16), which defines the data sequence number at the start of the segment (defined by the Data Sequence Mapping) that had the checksum failure.
'''
MP_FAILcould be sent withMP_RSTat the same time.This patch fixed it.
Fixes c3b546f7292ac ("mptcp: implement fastclose xmit path")
Quoted 7 lines
Quoted 5 lines
I bugged a bit when looking at your patch because I was not able to see the issue on -net nor net-next. But then I noticed this patch is in fact a Squash-to patch :)
Then good catch to have seen that before upstreaming these patches!
Updated in v2 as a squash-to patch.
Thanks!
Quoted 6 lines
Quoted 3 lines
But then, I'm not sure this modification is enough: in
mptcp_write_options(), it looks likeMP_FASTCLOSEandMP_RSTare mutually exclusive, no?
MP_FAILcan be sent withMP_RSTinmptcp_write_options(). So no need to modify the code inmptcp_write_options().
If I'm not mistaken, with your patch, you allow MP_RST to be sent with MP_FAIL and MP_FASTCLOSE but MP_FAIL cannot be sent with a MP_FASTCLOSE.
In mptcp_write_options(), we don't do the same: MP_FAIL can be sent with MP_FASTCLOSE and MP_RST but MP_FASTCLOSE cannot be sent with MP_RST, no?
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Re: [PATCH mptcp-next 1/2] mptcp: send MP_FAIL with MP_RST
29 Nov 2021 07:47:59 Matthieu Baerts <[email protected]>:
Quoted 40 lines
Hi Geliang,
29 Nov 2021 05:12:36 Geliang Tang <[email protected]>:
Quoted 22 lines · Matthieu Baerts
Quoted 21 lines
Hi Geliang,
+cc: Paolo
Quoted 15 lines · Geliang Tang
As described in RFC8684, 3.7 Fallback:
'''
Therefore, it is not possible to recover the subflow, and the affected subflow must be immediately closed with a RST that includes anMP_FAILoption (Figure 16), which defines the data sequence number at the start of the segment (defined by the Data Sequence Mapping) that had the checksum failure.
'''
MP_FAILcould be sent withMP_RSTat the same time.This patch fixed it.
Fixes c3b546f7292ac ("mptcp: implement fastclose xmit path")Quoted 7 lines
Quoted 5 lines
I bugged a bit when looking at your patch because I was not able to see the issue on -net nor net-next. But then I noticed this patch is in fact a Squash-to patch :)
Then good catch to have seen that before upstreaming these patches!
Updated in v2 as a squash-to patch.
Thanks!
Quoted 4 lines
Quoted 3 lines
But then, I'm not sure this modification is enough: in
mptcp_write_options(), it looks likeMP_FASTCLOSEandMP_RSTare mutually exclusive, no?
Quoted 6 lines
Quoted 2 lines
MP_FAILcan be sent withMP_RSTinmptcp_write_options(). So no need to modify the code inmptcp_write_options().If I'm not mistaken, with your patch, you allow
MP_RSTto be sent withMP_FAILandMP_FASTCLOSEbutMP_FAILcannot be sent with aMP_FASTCLOSE.In
mptcp_write_options(), we don't do the same:MP_FAILcan be sent withMP_FASTCLOSEandMP_RSTbutMP_FASTCLOSEcannot be sent withMP_RST, no?
It would be good to have a regression test making sure we have this behaviour and we don't change it but mistake. I think packetdrill would be very helpful for that :)
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net