Up to this series, it was possible to add a "signal" MPTCP endpoint with
an IPv6 address and a port, or to directly request to send an ADD_ADDR
with a v6 address and a port, but the expected ADD_ADDR wasn't sent when
TCP timestamps was used for the connection.

In fact, such signalling option cannot be sent when TCP timestamps is
used due to a lack of option space: the limit is at 40 bytes, and, with
padding, TCP timestamps is taking 12 bytes, while an ADD_ADDR IPv6 +
port is taking 30 bytes. The selected solution here is to simply drop
the TCP timestamps option when such ADD_ADDR of 30 bytes needs to be
sent.

- Patches 1-3: small cleanups to avoid computing ADD/RM_ADDR twice.

- Patches 4-7: the new feature, controlled by a new sysctl knob.

- Patch 8: extra checks in the MPTCP Join selftests.

- Patches 9-15: A bunch of refactoring: renamed confusing helpers and
  variables, and prevent future misused functions.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
---
Changes in v2:
- Rebased: some diff caused by commit a02a765bd5c2 ("mptcp: change
  mptcp_established_options() to return opt_size") and commit
  bd34fa025726 ("mptcp: add-addr: always drop other suboptions")
- Patch 4: Use READ_ONCE() to read sysctl data. (Eric)
- Patches 5-6: Avoid passing local variables' addresses to
  mptcp_established_options not to force the compiler to use a stack
  canary in this hot function, even for non-MPTCP flows. (Eric)
- Replaced previous patches 9-11 modifying selftests by a bunch of
  pm related refactoring: patches 9-15.
- Link to v1: 
https://patch.msgid.link/20260601-net-next-mptcp-add-addr6-port-ts-v1-0-4fc25dfef...@kernel.org

---
Matthieu Baerts (NGI0) (15):
      mptcp: options: suboptions sizes can be negative
      mptcp: pm: avoid computing rm_addr size twice
      mptcp: pm: avoid computing add_addr size twice
      mptcp: introduce add_addr_v6_port_drop_ts sysctl knob
      tcp: allow mptcp to drop TS for some packets
      mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
      selftests: mptcp: validate ADD_ADDRv6 + TS + port
      selftests: mptcp: always check sent/dropped ADD_ADDRs
      mptcp: pm: use for_each_subflow helper
      mptcp: pm: rename add_entry structure to add_addr
      mptcp: pm: uniform announced addresses helpers
      mptcp: pm: remove add_ prefix from timer
      mptcp: pm: make mptcp_pm_add_addr_send_ack static
      mptcp: pm: avoid using del_timer directly
      mptcp: options: rst: drop unused skb parameter

 Documentation/networking/mptcp-sysctl.rst       |  13 ++
 include/net/mptcp.h                             |  13 +-
 net/ipv4/tcp_output.c                           |  10 +-
 net/mptcp/ctrl.c                                |  18 ++-
 net/mptcp/options.c                             |  68 +++------
 net/mptcp/pm.c                                  | 191 ++++++++++++++----------
 net/mptcp/pm_kernel.c                           |  22 +--
 net/mptcp/pm_userspace.c                        |   6 +-
 net/mptcp/protocol.h                            |  48 ++----
 net/mptcp/subflow.c                             |   4 +-
 tools/testing/selftests/net/mptcp/mptcp_join.sh |  83 +++++-----
 11 files changed, 248 insertions(+), 228 deletions(-)
---
base-commit: bfa3d89cc15c09f7d1581c834a5ed725189ec19f
change-id: 20260601-net-next-mptcp-add-addr6-port-ts-40d8d74d8e20

Best regards,
--  
Matthieu Baerts (NGI0) <[email protected]>


Reply via email to