netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net 0/2] tcp: Fix bhash2 and TIME_WAIT regression.
@ 2022-12-21 15:12 Kuniyuki Iwashima
  2022-12-21 15:12 ` [PATCH RFC net 1/2] tcp: Add TIME_WAIT sockets in bhash2 Kuniyuki Iwashima
  2022-12-21 15:12 ` [PATCH RFC net 2/2] tcp: Add selftest for bind() and TIME_WAIT Kuniyuki Iwashima
  0 siblings, 2 replies; 15+ messages in thread
From: Kuniyuki Iwashima @ 2022-12-21 15:12 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 TIME_WAIT sockets to bhash2.  Therefore twsk cannot
prevent bind() to the same local address and port.

The first patch fixes the issue, but the layout change in struct
sock could have a negative impact.  So, this series is RFC.


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

 include/net/inet_timewait_sock.h            |  2 +
 include/net/sock.h                          |  5 +-
 net/ipv4/inet_hashtables.c                  |  5 +-
 net/ipv4/inet_timewait_sock.c               | 31 ++++++-
 tools/testing/selftests/net/.gitignore      |  1 +
 tools/testing/selftests/net/bind_timewait.c | 93 +++++++++++++++++++++
 6 files changed, 131 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/selftests/net/bind_timewait.c

-- 
2.30.2


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

end of thread, other threads:[~2022-12-26 13:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 15:12 [PATCH RFC net 0/2] tcp: Fix bhash2 and TIME_WAIT regression Kuniyuki Iwashima
2022-12-21 15:12 ` [PATCH RFC net 1/2] tcp: Add TIME_WAIT sockets in bhash2 Kuniyuki Iwashima
2022-12-21 16:37   ` Jiri Slaby
2022-12-22 15:05   ` Paolo Abeni
2022-12-22 21:46     ` Joanne Koong
2022-12-22 23:26       ` Kuniyuki Iwashima
2022-12-23  0:25         ` Joanne Koong
2022-12-23  1:55           ` Kuniyuki Iwashima
2022-12-23 19:34             ` Joanne Koong
2022-12-26 13:21               ` Kuniyuki Iwashima
2022-12-23 10:15         ` Paolo Abeni
2022-12-23 17:08           ` Kuniyuki Iwashima
2022-12-21 15:12 ` [PATCH RFC net 2/2] tcp: Add selftest for bind() and TIME_WAIT Kuniyuki Iwashima
2022-12-22 21:41   ` Joanne Koong
2022-12-22 23:54     ` Kuniyuki Iwashima

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).