From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Jiri Slaby <jirislaby@kernel.org>,
Joanne Koong <joannelkoong@gmail.com>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>
Subject: [PATCH v1 net 0/2] tcp: Fix bhash2 and TIME_WAIT regression.
Date: Mon, 26 Dec 2022 22:27:51 +0900 [thread overview]
Message-ID: <20221226132753.44175-1-kuniyu@amazon.com> (raw)
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
next reply other threads:[~2022-12-26 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 13:27 Kuniyuki Iwashima [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221226132753.44175-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jirislaby@kernel.org \
--cc=joannelkoong@gmail.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).