netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	David Ahern <dsahern@kernel.org>
Cc: Joanne Koong <joannelkoong@gmail.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>,
	Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>
Subject: [PATCH v2 net 0/6] tcp: Fix bind() regression for v4-mapped-v6 address
Date: Mon, 11 Sep 2023 11:36:54 -0700	[thread overview]
Message-ID: <20230911183700.60878-1-kuniyu@amazon.com> (raw)

Since bhash2 was introduced, bind() is broken in two cases related
to v4-mapped-v6 address.

This series fixes the regression and adds test to cover the cases.


Changes:
  v2:
    * Added patch 1 to factorise duplicated comparison (Eric Dumazet)

  v1: https://lore.kernel.org/netdev/20230911165106.39384-1-kuniyu@amazon.com/


Kuniyuki Iwashima (6):
  tcp: Factorise sk_family-independent comparison in
    inet_bind2_bucket_match(_addr_any).
  tcp: Fix bind() regression for v4-mapped-v6 wildcard address.
  tcp: Fix bind() regression for v4-mapped-v6 non-wildcard address.
  selftest: tcp: Fix address length in bind_wildcard.c.
  selftest: tcp: Move expected_errno into each test case in
    bind_wildcard.c.
  selftest: tcp: Add v4-mapped-v6 cases in bind_wildcard.c.

 include/net/ipv6.h                          |  5 ++
 net/ipv4/inet_hashtables.c                  | 36 ++++++-----
 tools/testing/selftests/net/bind_wildcard.c | 68 +++++++++++++++++----
 3 files changed, 82 insertions(+), 27 deletions(-)

-- 
2.30.2


             reply	other threads:[~2023-09-11 18:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 18:36 Kuniyuki Iwashima [this message]
2023-09-11 18:36 ` [PATCH v2 net 1/6] tcp: Factorise sk_family-independent comparison in inet_bind2_bucket_match(_addr_any) Kuniyuki Iwashima
2023-09-12  4:48   ` Eric Dumazet
2023-09-11 18:36 ` [PATCH v2 net 2/6] tcp: Fix bind() regression for v4-mapped-v6 wildcard address Kuniyuki Iwashima
2023-09-12  4:58   ` Eric Dumazet
2023-09-11 18:36 ` [PATCH v2 net 3/6] tcp: Fix bind() regression for v4-mapped-v6 non-wildcard address Kuniyuki Iwashima
2023-09-12  4:59   ` Eric Dumazet
2023-09-12  7:25   ` Andrei Vagin
2023-09-12  7:59     ` Kuniyuki Iwashima
2023-09-12 14:29       ` Andrei Vagin
2023-09-11 18:36 ` [PATCH v2 net 4/6] selftest: tcp: Fix address length in bind_wildcard.c Kuniyuki Iwashima
2023-09-11 18:36 ` [PATCH v2 net 5/6] selftest: tcp: Move expected_errno into each test case " Kuniyuki Iwashima
2023-09-11 18:37 ` [PATCH v2 net 6/6] selftest: tcp: Add v4-mapped-v6 cases " Kuniyuki Iwashima
2023-09-11 18:54 ` [PATCH v2 net 0/6] tcp: Fix bind() regression for v4-mapped-v6 address Martin KaFai Lau
2023-09-13  6:20 ` 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=20230911183700.60878-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --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).