diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-01-28 14:41:07 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-02-04 09:16:19 -0500 |
commit | 7b9e8522a65886d8ae168547a67c3617b6ba83f1 (patch) | |
tree | 285c0d08f3e967abb7e3c33e4846da353270183b /include | |
parent | 885c91f74662404dc179b8775494df383479311c (diff) |
nfsd: fix IPv6 address handling in the DRC
Currently, it only stores the first 16 bytes of any address. struct
sockaddr_in6 is 28 bytes however, so we're currently ignoring the last
12 bytes of the address.
Expand the c_addr field to a sockaddr_in6, and cast it to a sockaddr_in
as necessary. Also fix the comparitor to use the existing RPC
helpers for this.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/clnt.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 34206b84d8da..47354a25a927 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -263,7 +263,9 @@ static inline bool __rpc_copy_addr6(struct sockaddr *dst, | |||
263 | * @sap1: first sockaddr | 263 | * @sap1: first sockaddr |
264 | * @sap2: second sockaddr | 264 | * @sap2: second sockaddr |
265 | * | 265 | * |
266 | * Just compares the family and address portion. Ignores port, scope, etc. | 266 | * Just compares the family and address portion. Ignores port, but |
267 | * compares the scope if it's a link-local address. | ||
268 | * | ||
267 | * Returns true if the addrs are equal, false if they aren't. | 269 | * Returns true if the addrs are equal, false if they aren't. |
268 | */ | 270 | */ |
269 | static inline bool rpc_cmp_addr(const struct sockaddr *sap1, | 271 | static inline bool rpc_cmp_addr(const struct sockaddr *sap1, |