netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net 0/2] tcp: Fix bhash2 and TIME_WAIT regression.
@ 2022-12-26 13:27 Kuniyuki Iwashima
  2022-12-26 13:27 ` [PATCH v1 net 1/2] tcp: Add TIME_WAIT sockets in bhash2 Kuniyuki Iwashima
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kuniyuki Iwashima @ 2022-12-26 13:27 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Jiri Slaby, Joanne Koong, Kuniyuki Iwashima, Kuniyuki Iwashima,
	netdev

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/20221221151258.25748-1-kuniyu@amazon.com/


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

-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-30  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-26 13:27 [PATCH v1 net 0/2] tcp: Fix bhash2 and TIME_WAIT regression Kuniyuki Iwashima
2022-12-26 13:27 ` [PATCH v1 net 1/2] tcp: Add TIME_WAIT sockets in bhash2 Kuniyuki Iwashima
2022-12-27 18:26   ` Joanne Koong
2022-12-26 13:27 ` [PATCH v1 net 2/2] tcp: Add selftest for bind() and TIME_WAIT Kuniyuki Iwashima
2022-12-27 18:08   ` Joanne Koong
2022-12-30  7:40 ` [PATCH v1 net 0/2] tcp: Fix bhash2 and TIME_WAIT regression patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).