Skip to content

RFC TCP Extra-option framework for TCP-MD5 and SMC

Christoph Paasch mptcp 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest15 patches 30 repliesIn review
  2. v225 patches 30 repliesSuperseded
  3. v118 patches 14 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15tcp md5sig: Use skb's saddr when replying to an incoming segmentnet/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c+2 -22 replies
2/15tcp: Write options after the header has been fully donenet/ipv4/tcp_output.c+2 -20 replies
3/15tcp: Pass sock and skb to tcp_options_writenet/ipv4/tcp_output.c+7 -32 replies
4/15tcp: Allow tcp_fast_parse_options to drop segmentsnet/ipv4/tcp_input.c+11 -53 replies
5/15tcp: Make smc_parse_options return 1 on successnet/ipv4/tcp_input.c+11 -82 replies
6/15tcp: Register handlers for extra TCP optionsdrivers/infiniband/hw/cxgb4/cm.c include/linux/tcp.h include/net/tcp.h +8 more+664 -516 replies
7/15tcp_smc: Make SMC use TCP extra-option frameworkinclude/linux/tcp.h include/net/inet_sock.h include/net/tcp.h +5 more+171 -1272 replies
8/15tcp_md5: Don't pass along md5-keyinclude/linux/tcp.h net/ipv4/tcp_output.c+20 -270 replies
9/15tcp_md5: Detect key inside tcp_v4_send_ack instead of passing it as an argumentnet/ipv4/tcp_ipv4.c+14 -40 replies
10/15tcp_md5: Detect key inside tcp_v6_send_response instead of passing it as an argumentnet/ipv6/tcp_ipv6.c+57 -620 replies
11/15tcp_md5: Check for TCP_MD5 after TCP Timestamps in tcp_established_optionsnet/ipv4/tcp_output.c+7 -70 replies
12/15tcp_md5: Move TCP-MD5 code out of TCP itselfinclude/linux/inet_diag.h include/linux/tcp_md5.h include/net/tcp.h +9 more+1306 -11332 replies
13/15tcp_md5: Use tcp_extra_options in output pathinclude/linux/tcp.h include/linux/tcp_md5.h net/ipv4/tcp_ipv4.c +4 more+465 -4382 replies
14/15tcp_md5: Cleanup TCP-codeinclude/linux/tcp.h include/linux/tcp_md5.h include/net/tcp.h +4 more+155 -2590 replies
15/15tcp_md5: Use TCP extra-options on the input pathinclude/linux/tcp_md5.h net/ipv4/tcp_input.c net/ipv4/tcp_ipv4.c +2 more+25 -532 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [MPTCP] [RFC v3 00/15] TCP Extra-option framework for TCP-MD5 and SMC

3rd version of the set.

Now, fully tested and bugs fixed.

There are a two rather big changes (most of it is commented on in the notes):

* Made the tcp_option_list and RCU-protected hlist. We need RCU-protection because listener sockets are lockless nowadays.
* Previously, in tcp_v4_send_reset, we would lookup the MD5-signature and if there was one, go look for the listening-socket (if sk == NULL) to see if there is an MD5-key.
Nowadays, we can't do this anymore because extra-options are only parsed when we actually have a socket. However, this shouldn't have an impact as far as I can see. Because, if there is a listening-socket, __inet_lookup_skb will match on it and when we then send a RST when coming from tcp_rcv_state_process we have the pointer to the listening socket.
The only scenario wherer tcp_v4_send_reset() gets called with a NULL sk is when coming straight from tcp_v4_rcv.

If there are no major comments, I would like to go to netdev as a next step.

Christoph Paasch (14):
tcp md5sig: Use skb's saddr when replying to an incoming segment
tcp: Write options after the header has been fully done
tcp: Pass sock and skb to tcp_options_write
tcp: Allow tcp_fast_parse_options to drop segments
tcp: Make smc_parse_options return 1 on success
tcp_smc: Make SMC use TCP extra-option framework
tcp_md5: Don't pass along md5-key
tcp_md5: Detect key inside tcp_v4_send_ack instead of passing it as an
argument
tcp_md5: Detect key inside tcp_v6_send_response instead of passing it
as an argument
tcp_md5: Check for TCP_MD5 after TCP Timestamps in
tcp_established_options
tcp_md5: Move TCP-MD5 code out of TCP itself
tcp_md5: Use tcp_extra_options in output path
tcp_md5: Cleanup TCP-code
tcp_md5: Use TCP extra-options on the input path

Mat Martineau (1):
tcp: Register handlers for extra TCP options

 drivers/infiniband/hw/cxgb4/cm.c |    2 +-
 include/linux/inet_diag.h        |    1 +
 include/linux/tcp.h              |   43 +-
 include/linux/tcp_md5.h          |   39 ++
 include/net/inet_sock.h          |    3 +-
 include/net/tcp.h                |  209 +++---
 net/ipv4/Makefile                |    1 +
 net/ipv4/syncookies.c            |    6 +-
 net/ipv4/tcp.c                   |  399 +++++++++---
 net/ipv4/tcp_diag.c              |   81 +--
 net/ipv4/tcp_input.c             |  140 ++--
 net/ipv4/tcp_ipv4.c              |  545 ++--------------
 net/ipv4/tcp_md5.c               | 1340 ++++++++++++++++++++++++++++++++++++++
 net/ipv4/tcp_minisocks.c         |   75 +--
 net/ipv4/tcp_output.c            |  179 +----
 net/ipv6/syncookies.c            |    6 +-
 net/ipv6/tcp_ipv6.c              |  382 +----------
 net/smc/af_smc.c                 |  175 ++++-
 18 files changed, 2181 insertions(+), 1445 deletions(-)
 create mode 100644 include/linux/tcp_md5.h
 create mode 100644 net/ipv4/tcp_md5.c
Signature · 1 line
2.15.0