Fix bug processing options
Subsystems (2)
Peter Krystad
cover Fix bug processing options
Do not process incoming options if the subflow is not MPTCP.
Observed crash when running against out-of-tree kernel with mis-matched checksum options.
Peter Krystad (2):
mptcp: Ignore incoming MPTCP options when not MP_CAPABLE
mptcp: Ignore incoming MPTCP options when not MP_CAPABLE
net/mptcp/options.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 1 line
2.17.2
Peter Krystad
PATCH 1/2 mptcp: Ignore incoming MPTCP options when not MP_CAPABLE
Any options received on a fallback subflow should be ignored.
squashto: Implement MPTCP receive path
--- net/mptcp/options.c | 3 +++ 1 file changed, 3 insertions(+)
net/mptcp/options.c +3 -0
@@ -591,6 +591,9 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb,struct mptcp_options_received *mp_opt;struct mptcp_ext *mpext; +if (!subflow->mp_capable) +return ; + mp_opt = &opt_rx->mptcp;if (msk && mp_opt->add_addr) {
Signature · 1 line
2.17.2
Peter Krystad
PATCH 2/2 mptcp: Ignore incoming MPTCP options when not MP_CAPABLE
In reply to Peter KrystadAny options received on a fallback subflow should be ignored.
squashto: Add handling of incoming MP_JOIN requests
--- net/mptcp/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/options.c +1 -1
@@ -591,7 +591,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb,struct mptcp_options_received *mp_opt;struct mptcp_ext *mpext; -if (!subflow->mp_capable) +if (!subflow->mp_capable && !subflow->mp_join)return ; mp_opt = &opt_rx->mptcp;
Signature · 1 line
2.17.2
Matthieu Baerts
Hi Peter,
Quoted 2 lines · Peter Krystad
Observed crash when running against out-of-tree kernel with mis-matched checksum options.
Thank you for doing this kind of tests!
Quoted 1 line
Do not process incoming options if the subflow is not MPTCP.
Are we not supposed not to deal with MPTCP options after a fallback to TCP?
If we fallback to TCP, should we not always set 'tp->is_mptcp' to false?
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
Peter Krystad
Quoted 7 lines · Matthieu Baerts
Hi Peter,
Quoted 2 lines · Peter Krystad
Observed crash when running against out-of-tree kernel with mis-matched checksum options.
Thank you for doing this kind of tests!
It was an accident, I forgot to disable checksum on the out-of-tree side...
Quoted 6 lines
Quoted 2 lines
Do not process incoming options if the subflow is not MPTCP.
Are we not supposed not to deal with MPTCP options after a fallback to TCP?
If we fallback to TCP, should we not always set '
tp->is_mptcp' to false?
Currently for fallback we set is_mptcp=0 after the connection negotiation is complete [in mptcp_accept()] and presumeably everything is fine after that point. In this specific situation (we don't send MP_CAPABLE in the third ack because we don't support checksum) the out-of-tree kernel resends the syn-ack with DSS options, and these packets are processed before is_mptcp is cleared. I think we are in uncharted territory here because of how we reject the other sides request for checksums, but this check can't hurt.
Peter.
Quoted 3 lines
Cheers,
Matt
Mat Martineau
Quoted 5 lines · Peter Krystad
Do not process incoming options if the subflow is not MPTCP.
Observed crash when running against out-of-tree kernel with mis-matched checksum options.
Quoted 7 lines
Peter Krystad (2):
mptcp: Ignore incoming MPTCP options when notMP_CAPABLE
mptcp: Ignore incoming MPTCP options when notMP_CAPABLE
net/mptcp/options.c| 3 +++1 file changed, 3 insertions(+)
Both changes look good to me. Thanks, Peter!
--
Mat Martineau
Intel
Matthieu Baerts
Hi Peter, Mat,
Quoted 12 lines · Mat Martineau
Quoted 9 lines · Peter Krystad
Do not process incoming options if the subflow is not MPTCP.
Observed crash when running against out-of-tree kernel with mis-matched checksum options.
Peter Krystad (2):
mptcp: Ignore incoming MPTCP options when notMP_CAPABLE
mptcp: Ignore incoming MPTCP options when notMP_CAPABLE
Quoted 5 lines
Quoted 3 lines
net/mptcp/options.c| 3 +++1 file changed, 3 insertions(+)Both changes look good to me. Thanks, Peter!
Thank you for the patches and the reviews!
- 6eb607af7475: "squashed" patch 1/2 in "mptcp: Implement MPTCP receive path"
- ea443b296417: "squashed" patch 2/2 in "mptcp: Add handling of outgoing MP_JOIN requests"
- 22b6803a0c48..a89f2feb5b90: result
Tests are still OK!
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
Matthieu Baerts
Hi,
It seems this email I wanted to send end of last week didn't go through.
Quoted 23 lines · Matthieu Baerts
Hi Peter, Mat,
Quoted 12 lines · Mat Martineau
Quoted 9 lines · Peter Krystad
Do not process incoming options if the subflow is not MPTCP.
Observed crash when running against out-of-tree kernel with mis-matched checksum options.
Peter Krystad (2):
mptcp: Ignore incoming MPTCP options when notMP_CAPABLE
mptcp: Ignore incoming MPTCP options when notMP_CAPABLEQuoted 5 lines
Quoted 3 lines
net/mptcp/options.c| 3 +++1 file changed, 3 insertions(+)Both changes look good to me. Thanks, Peter!
Thank you for the patches and the reviews!
Quoted 7 lines
-
6eb607af7475: "squashed" patch 1/2 in "mptcp: Implement MPTCP receive path"
-ea443b296417: "squashed" patch 2/2 in "mptcp: Add handling of outgoingMP_JOINrequests"
-22b6803a0c48..a89f2feb5b90: resultTests are still OK!
I had to do a small change to allow the compilation of each commit:
net/mptcp/options.c +0 -0
@@ -391,6 +391,7 @@ bool mptcp_synack_options(const struct request_sock
*req, unsigned int *size,
void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb,
struct tcp_options_received *opt_rx)
{
+ struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
struct mptcp_options_received *mp_opt;
struct mptcp_ext *mpext;The subflow variable is declared later on in "mptcp: Add path manager interface"
- c559c9eb4f9f: "squashed" in "mptcp: Implement MPTCP receive path"
- 9c984d940c41: conflict in t/mptcp-Add-path-manager-interface
- no diff at the end.
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium