public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Ben Greear <greearb@candelatech.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	chuck.lever@oracle.com
Subject: Re: bug in match_ipaddr6 ?
Date: Fri, 3 Sep 2010 09:02:36 -0400	[thread overview]
Message-ID: <20100903090236.57a4699e@corrin.poochiereds.net> (raw)
In-Reply-To: <4C8026F7.10202@candelatech.com>

On Thu, 02 Sep 2010 15:36:39 -0700
Ben Greear <greearb@candelatech.com> wrote:

> static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1,
> 				      const struct sockaddr *sa2)
> {
> 	const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sa1;
> 	const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sa2;
> 
> 	if (ipv6_addr_scope(&sin1->sin6_addr) == IPV6_ADDR_SCOPE_LINKLOCAL &&
> 	    sin1->sin6_scope_id != sin2->sin6_scope_id)
> 		return 0;
> 
> 	return ipv6_addr_equal(&sin1->sin6_addr, &sin1->sin6_addr);
> 
> Looks like this last line, second argument should be &sin2->sin6_addr ???
> 
> Thanks,
> Ben
> 

Ouch. Yes, that does look wrong. Care to send a patch to fix it?

-- 
Jeff Layton <jlayton@redhat.com>

      reply	other threads:[~2010-09-03 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 22:36 bug in match_ipaddr6 ? Ben Greear
2010-09-03 13:02 ` Jeff Layton [this message]

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=20100903090236.57a4699e@corrin.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=greearb@candelatech.com \
    --cc=linux-nfs@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