netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <davem@davemloft.net>, <tom@herbertland.com>,
	<netdev@vger.kernel.org>, <kafai@fb.com>
Subject: Re: [PATCH] inet: don't use sk_v6_rcv_saddr directly
Date: Fri, 20 Jan 2017 09:18:32 -0500	[thread overview]
Message-ID: <1484921912.786.1@smtp.office365.com> (raw)
In-Reply-To: <1484866066-25407-1-git-send-email-jbacik@fb.com>

On Thu, Jan 19, 2017 at 5:47 PM, Josef Bacik <jbacik@fb.com> wrote:
> When comparing two sockets we need to use inet6_rcv_saddr so we get a 
> NULL
> sk_v6_rcv_saddr if the socket isn't AF_INET6, otherwise our 
> comparison function
> can be wrong.
> 
> Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a 
> reuseport sk")
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
>  net/ipv4/inet_connection_sock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/inet_connection_sock.c 
> b/net/ipv4/inet_connection_sock.c
> index 096a085..a336c42 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -99,7 +99,7 @@ int inet_rcv_saddr_equal(const struct sock *sk, 
> const struct sock *sk2,
>  #if IS_ENABLED(CONFIG_IPV6)
>  	if (sk->sk_family == AF_INET6)
>  		return ipv6_rcv_saddr_equal(&sk->sk_v6_rcv_saddr,
> -					    &sk2->sk_v6_rcv_saddr,
> +					    inet6_rcv_saddr(sk2),
>  					    sk->sk_rcv_saddr,
>  					    sk2->sk_rcv_saddr,
>  					    ipv6_only_sock(sk),
> --
> 2.5.5

Sorry I forgot to tag this, it's for net-next.  Thanks,

Josef

  reply	other threads:[~2017-01-20 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 22:47 [PATCH] inet: don't use sk_v6_rcv_saddr directly Josef Bacik
2017-01-20 14:18 ` Josef Bacik [this message]
2017-01-20 19:36 ` David Miller

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=1484921912.786.1@smtp.office365.com \
    --to=jbacik@fb.com \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.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).