Skip to content

tcp: Fix bhash2 and TIME_WAIT regression.

Kuniyuki Iwashima netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Changes in v1 from the cover letter

* Patch 1:
* Add tw_bind2_node in inet_timewait_sock instead of moving sk_bind2_node from struct sock to struct sock_common.

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2tcp: Add TIME_WAIT sockets in bhash2.include/net/inet_hashtables.h include/net/inet_timewait_sock.h net/ipv4/inet_connection_sock.c +2 more+65 -91 replyApplied
2/2tcp: Add selftest for bind() and TIME_WAIT.tools/testing/selftests/net/.gitignore tools/testing/selftests/net/bind_timewait.c+93 -01 replyApplied

Reviews trailers per patch

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

PatchJoanne Koong
1/2A-b
2/2A-b

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

Read the v1 thread

Cover letter [PATCH v1 net 0/2] tcp: Fix bhash2 and TIME_WAIT regression.

We forgot to add twsk to bhash2. Therefore TIME_WAIT sockets cannot prevent bind() to the same local address and port.

Changes:
v1:
* Patch 1:
* Add tw_bind2_node in inet_timewait_sock instead of moving sk_bind2_node from struct sock to struct sock_common.

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

Kuniyuki Iwashima (2):
tcp: Add TIME_WAIT sockets in bhash2.
tcp: Add selftest for bind() and TIME_WAIT.

 include/net/inet_hashtables.h               |  4 +
 include/net/inet_timewait_sock.h            |  5 ++
 net/ipv4/inet_connection_sock.c             | 26 +++++-
 net/ipv4/inet_hashtables.c                  |  8 +-
 net/ipv4/inet_timewait_sock.c               | 31 ++++++-
 tools/testing/selftests/net/.gitignore      |  1 +
 tools/testing/selftests/net/bind_timewait.c | 92 +++++++++++++++++++++
 7 files changed, 158 insertions(+), 9 deletions(-)
 create mode 100644 tools/testing/selftests/net/bind_timewait.c
Signature · 1 line
2.30.2