diff options
author | Alexander Aring <alex.aring@gmail.com> | 2013-12-20 23:39:04 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-01-05 15:38:21 -0500 |
commit | a8c2275493b866961f4429a741251c630c4fc6d7 (patch) | |
tree | 469cf74c0112e426aa48a3e93f3ceec91eb8b959 /fs/nfs/nfs4filelayoutdev.c | |
parent | 6ff33b7dd0228b7d7ed44791bbbc98b03fd15d9d (diff) |
nfs: fix dead code of ipv6_addr_scope
The correct way to check on IPV6_ADDR_SCOPE_LINKLOCAL is to check with
the ipv6_addr_src_scope function.
Currently this can't be work, because ipv6_addr_scope returns a int with
a mask of IPV6_ADDR_SCOPE_MASK (0x00f0U) and IPV6_ADDR_SCOPE_LINKLOCAL
is 0x02. So the condition is always false.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4filelayoutdev.c')
-rw-r--r-- | fs/nfs/nfs4filelayoutdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index c7c295e556ed..efac602edb37 100644 --- a/fs/nfs/nfs4filelayoutdev.c +++ b/fs/nfs/nfs4filelayoutdev.c | |||
@@ -95,7 +95,7 @@ same_sockaddr(struct sockaddr *addr1, struct sockaddr *addr2) | |||
95 | b6 = (struct sockaddr_in6 *)addr2; | 95 | b6 = (struct sockaddr_in6 *)addr2; |
96 | 96 | ||
97 | /* LINKLOCAL addresses must have matching scope_id */ | 97 | /* LINKLOCAL addresses must have matching scope_id */ |
98 | if (ipv6_addr_scope(&a6->sin6_addr) == | 98 | if (ipv6_addr_src_scope(&a6->sin6_addr) == |
99 | IPV6_ADDR_SCOPE_LINKLOCAL && | 99 | IPV6_ADDR_SCOPE_LINKLOCAL && |
100 | a6->sin6_scope_id != b6->sin6_scope_id) | 100 | a6->sin6_scope_id != b6->sin6_scope_id) |
101 | return false; | 101 | return false; |