dccp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Vagin <avagin@gmail.com>
To: dccp@vger.kernel.org
Subject: Re: [PATCH RESEND net-next v4 1/3] net: Add a bhash2 table hashed by port and address
Date: Mon, 11 Sep 2023 23:36:55 +0000	[thread overview]
Message-ID: <ZP+kl4/UuTaQTGPT@google.com> (raw)

On Mon, Aug 22, 2022 at 11:10:21AM -0700, Joanne Koong wrote:
>  
> +static bool inet_use_bhash2_on_bind(const struct sock *sk)
> +{
> +#if IS_ENABLED(CONFIG_IPV6)
> +	if (sk->sk_family = AF_INET6) {
> +		int addr_type = ipv6_addr_type(&sk->sk_v6_rcv_saddr);
> +
> +		return addr_type != IPV6_ADDR_ANY &&
> +			addr_type != IPV6_ADDR_MAPPED;
>

Why do we return false to all mapped addresses? Should it be

(addr_type != IPV6_ADDR_MAPPED || sk->sk_rcv_saddr != htonl(INADDR_ANY))

>
> +	}
> +#endif
> +	return sk->sk_rcv_saddr != htonl(INADDR_ANY);
> +}
> +
>
Thanks,
Andrei

             reply	other threads:[~2023-09-11 23:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 23:36 Andrei Vagin [this message]
2023-09-12  0:06 ` [PATCH RESEND net-next v4 1/3] net: Add a bhash2 table hashed by port and address Iwashima, Kuniyuki
  -- strict thread matches above, loose matches on Subject: below --
2022-08-22 18:10 Joanne Koong

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=ZP+kl4/UuTaQTGPT@google.com \
    --to=avagin@gmail.com \
    --cc=dccp@vger.kernel.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).