Skip to content

tcp: Clean up and refactor cookie_v[46]_check().

Kuniyuki Iwashima netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 4 repliesApplied 8/8
  2. v28 patches 12 repliesSuperseded
  3. v18 patches 9 repliesSuperseded

Changes in v3 from the cover letter

Patch 8: Fix ecn_ok init (Eric Dumazet)

Patches in v3 All 8 applied

#Subject and filesSizeRepliesApplied
1/8tcp: Clean up reverse xmas tree in cookie_v[46]_check().net/ipv4/syncookies.c net/ipv6/syncookies.c+11 -110 repliesApplied
2/8tcp: Cache sock_net(sk) in cookie_v[46]_check().net/ipv4/syncookies.c net/ipv6/syncookies.c+21 -190 repliesApplied
3/8tcp: Clean up goto labels in cookie_v[46]_check().net/ipv4/syncookies.c net/ipv6/syncookies.c+13 -130 repliesApplied
4/8tcp: Don't pass cookie to __cookie_v[46]_check().include/linux/netfilter_ipv6.h include/net/tcp.h net/core/filter.c +3 more+28 -350 repliesApplied
5/8tcp: Don't initialise tp->tsoffset in tcp_get_cookie_sock().include/net/tcp.h net/ipv4/syncookies.c net/ipv6/syncookies.c+6 -70 repliesApplied
6/8tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie().include/net/tcp.h include/net/tcp_ao.h net/ipv4/syncookies.c +2 more+22 -240 repliesApplied
7/8tcp: Factorise cookie-independent fields initialisation in cookie_v[46]_check().net/ipv4/syncookies.c net/ipv6/syncookies.c+37 -450 repliesApplied
8/8tcp: Factorise cookie-dependent fields initialisation in cookie_v[46]_check()include/net/tcp.h net/ipv4/syncookies.c net/ipv6/syncookies.c+99 -811 replyApplied

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchSimon HormanEric Dumazet
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b
7/8R-b R-b
8/8R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/8] tcp: Clean up and refactor cookie_v[46]_check().

This is a preparation series for upcoming arbitrary SYN Cookie support with BPF. [0]

There are slight differences between cookie_v[46]_check(). Such a discrepancy caused an issue in the past, and BPF SYN Cookie support will add more churn.

The primary purpose of this series is to clean up and refactor cookie_v[46]_check() to minimise such discrepancies and make the BPF series easier to review.

[0]: https://lore.kernel.org/netdev/[email protected]/

Changes:
v3:
Patch 8: Fix ecn_ok init (Eric Dumazet)

v2: https://lore.kernel.org/netdev/[email protected]/

    Patch 7: Remove duplicated treq->syn_tos init (Simon Horman)

v1: https://lore.kernel.org/netdev/[email protected]/

Kuniyuki Iwashima (8):
tcp: Clean up reverse xmas tree in cookie_v[46]_check().
tcp: Cache sock_net(sk) in cookie_v[46]_check().
tcp: Clean up goto labels in cookie_v[46]_check().
tcp: Don't pass cookie to __cookie_v[46]_check().
tcp: Don't initialise tp->tsoffset in tcp_get_cookie_sock().
tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie().
tcp: Factorise cookie-independent fields initialisation in

    cookie_v[46]_check().
  tcp: Factorise cookie-dependent fields initialisation in
    cookie_v[46]_check()
 include/linux/netfilter_ipv6.h   |   8 +-
 include/net/tcp.h                |  22 ++--
 include/net/tcp_ao.h             |   6 +-
 net/core/filter.c                |  15 +--
 net/ipv4/syncookies.c            | 215 ++++++++++++++++---------------
 net/ipv4/tcp_ao.c                |  16 ++-
 net/ipv6/syncookies.c            | 108 +++++++---------
 net/netfilter/nf_synproxy_core.c |   4 +-
 8 files changed, 198 insertions(+), 196 deletions(-)
Signature · 1 line
2.30.2