Message ID | 965954023c7a67bfd8e7f42bba7c19b512b8241c.camel@redhat.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | Re: [PATCH 1/2] mptcp: parse and emit MP_CAPABLE option according to v1 spec. | expand |
Hi Davide, On 29/11/2019 13:54, Davide Caratti wrote: > On Thu, 2019-11-07 at 07:28 -0800, Christoph Paasch wrote: >> -#define TCPOLEN_MPTCP_MPC_SYNACK 20 >> +#define TCPOLEN_MPTCP_MPC_SYN 4 >> +#define TCPOLEN_MPTCP_MPC_SYNACK 12 >> #define TCPOLEN_MPTCP_MPC_ACK 20 > > hello Christoph and Paolo, > > the length of the 'mp_capable' option in the SYN/ACK doesn't really change > when moving from v0 to v1 version of the MPTCP protocol. > > Current mptcp net-next echoes the client's key in the SYN/ACK but I think > this is not intentional (at least, it does not seem to adhere to section > 3.1 of RFC https://tools.ietf.org/html/rfc6824). Indeed, good catch, MP_CAPABLE options are taking 12 bytes for both the SYN and SYN/ACK. > For the record, this is why tcpdump refuses to dissect captures of > selftests: > > # ./mptcp_connect.sh -4 -c -e > > IP 10.0.1.1.49752 > 10.0.1.1.10000: Flags [S], seq 2594718977, win 65535, options [mss 65495,sackOK,TS val 3944347269 ecr 0,nop,wscale 8,mptcp capable {0xf931b304deb39a42}], length 0 > IP 10.0.1.1.10000 > 10.0.1.1.49752: Flags [S.], seq 3996234497, ack 2594718978, win 65535, options [mss 65495,sackOK,TS val 3944347270 ecr 3944347269,nop,wscale 8,mptcp capable[bad opt]> > ^^^ bad option > IP 10.0.1.1.49752 > 10.0.1.1.10000: Flags [.], ack 1, win 256, options [nop,nop,TS val 3944347270 ecr 3944347270,mptcp capable {0xf931b304deb39a42,0x96614f185e633ce}], length 0 > > and also, it's the reason why packetdrill never stores the server key in > its variables, see: > > https://github.com/dcaratti/packetdrill/issues/1#issuecomment-559569544 The new version of packetdrill is already helping us finding issues \o/ > is it possible to fix size of the syn/ack generated by v0 version of the > protocol as a separate patch? Otherwise I will need to add a special > handling for SYN/ACK packets generated by v0 net-next kernels packets. > > (the code I tried is quite trivial, and it passes the smoke-test in > tools/testing/selftests) Thank you for the patch! It looks good to me. I think it would be good to apply it before applying v1 patch. May you send a "proper patch"? If there is no objection (and an additional review?), I can apply it. Cheers, Matt
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index acad61c70de9..10347c9b4dff 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -34,7 +34,7 @@ /* MPTCP suboption lengths */ #define TCPOLEN_MPTCP_MPC_SYN 12 -#define TCPOLEN_MPTCP_MPC_SYNACK 20 +#define TCPOLEN_MPTCP_MPC_SYNACK 12 #define TCPOLEN_MPTCP_MPC_ACK 20 #define TCPOLEN_MPTCP_MPJ_SYN 12 #define TCPOLEN_MPTCP_MPJ_SYNACK 16 --- >8 ---