All of lore.kernel.org
 help / color / mirror / Atom feed
* [nfs] nfs:  Fix nfs_sockaddr_match_ipaddr6
@ 2010-09-03 16:15 Ben Greear
  2010-09-03 16:17 ` Chuck Lever
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2010-09-03 16:15 UTC (permalink / raw)
  To: linux-nfs; +Cc: Ben Greear

A typo caused this method not not actually compare the
two addresses passed in.  It returned true in almost all
cases instead.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 4e7df2a... e734072... M	fs/nfs/client.c
 fs/nfs/client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 4e7df2a..e734072 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -275,7 +275,7 @@ static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1,
 	    sin1->sin6_scope_id != sin2->sin6_scope_id)
 		return 0;
 
-	return ipv6_addr_equal(&sin1->sin6_addr, &sin1->sin6_addr);
+	return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr);
 }
 #else	/* !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) */
 static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1,
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [nfs] nfs:  Fix nfs_sockaddr_match_ipaddr6
  2010-09-03 16:15 [nfs] nfs: Fix nfs_sockaddr_match_ipaddr6 Ben Greear
@ 2010-09-03 16:17 ` Chuck Lever
  2010-09-03 16:22   ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2010-09-03 16:17 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-nfs


On Sep 3, 2010, at 12:15 PM, Ben Greear wrote:

> A typo caused this method not not actually compare the
> two addresses passed in.  It returned true in almost all
> cases instead.

>From the perspective of the local logic, that looks correct.  Have you tried this with IPv6 mounts?  Notice any overall changes in behavior?

> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> :100644 100644 4e7df2a... e734072... M	fs/nfs/client.c
> fs/nfs/client.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 4e7df2a..e734072 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -275,7 +275,7 @@ static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1,
> 	    sin1->sin6_scope_id != sin2->sin6_scope_id)
> 		return 0;
> 
> -	return ipv6_addr_equal(&sin1->sin6_addr, &sin1->sin6_addr);
> +	return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr);
> }
> #else	/* !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) */
> static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1,
> -- 
> 1.6.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [nfs] nfs:  Fix nfs_sockaddr_match_ipaddr6
  2010-09-03 16:17 ` Chuck Lever
@ 2010-09-03 16:22   ` Ben Greear
  2010-09-03 16:27     ` Chuck Lever
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2010-09-03 16:22 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs

On 09/03/2010 09:17 AM, Chuck Lever wrote:
>
> On Sep 3, 2010, at 12:15 PM, Ben Greear wrote:
>
>> A typo caused this method not not actually compare the
>> two addresses passed in.  It returned true in almost all
>> cases instead.
>
>  From the perspective of the local logic, that looks correct.  Have you tried this with IPv6 mounts?  Notice any overall changes in behavior?

I noticed this when getting multiple NFS mounts to work with srcaddr=

The change fixed the problems I was seeing, but I haven't tested w/out
srcaddr= logic.  Might need to have two different NFS servers to do a good
test of this logic, and I'm not looking forward to setting up another
open-solaris box!

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [nfs] nfs:  Fix nfs_sockaddr_match_ipaddr6
  2010-09-03 16:22   ` Ben Greear
@ 2010-09-03 16:27     ` Chuck Lever
  0 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2010-09-03 16:27 UTC (permalink / raw)
  To: Ben Greear, Trond Myklebust; +Cc: linux-nfs


On Sep 3, 2010, at 12:22 PM, Ben Greear wrote:

> On 09/03/2010 09:17 AM, Chuck Lever wrote:
>> 
>> On Sep 3, 2010, at 12:15 PM, Ben Greear wrote:
>> 
>>> A typo caused this method not not actually compare the
>>> two addresses passed in.  It returned true in almost all
>>> cases instead.
>> 
>> From the perspective of the local logic, that looks correct.  Have you tried this with IPv6 mounts?  Notice any overall changes in behavior?
> 
> I noticed this when getting multiple NFS mounts to work with srcaddr=
> 
> The change fixed the problems I was seeing, but I haven't tested w/out
> srcaddr= logic.  Might need to have two different NFS servers to do a good
> test of this logic, and I'm not looking forward to setting up another
> open-solaris box!

OK, so at least it doesn't seem to break anything. :^)

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>

-- 
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-03 16:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-03 16:15 [nfs] nfs: Fix nfs_sockaddr_match_ipaddr6 Ben Greear
2010-09-03 16:17 ` Chuck Lever
2010-09-03 16:22   ` Ben Greear
2010-09-03 16:27     ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.