diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-02-12 03:53:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:36 -0500 |
commit | 27459f0940e16c68e080f5fc7e85aa9eb3f74528 (patch) | |
tree | f13cd1f2005dda2b6115e2afbc49e1271b0d374b /net/sunrpc/svcauth_unix.c | |
parent | 2442222283918c2d1c20ae651d95fe168757938b (diff) |
[PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses
Expand the rq_addr field to allow it to contain larger addresses.
Specifically, we replace a 'sockaddr_in' with a 'sockaddr_storage', then
everywhere the 'sockaddr_in' was referenced, we use instead an accessor
function (svc_addr_in) which safely casts the _storage to _in.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/sunrpc/svcauth_unix.c')
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 987244f95909..4b775dbf580d 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -421,6 +421,7 @@ svcauth_unix_info_release(void *info) | |||
421 | static int | 421 | static int |
422 | svcauth_unix_set_client(struct svc_rqst *rqstp) | 422 | svcauth_unix_set_client(struct svc_rqst *rqstp) |
423 | { | 423 | { |
424 | struct sockaddr_in *sin = svc_addr_in(rqstp); | ||
424 | struct ip_map *ipm; | 425 | struct ip_map *ipm; |
425 | 426 | ||
426 | rqstp->rq_client = NULL; | 427 | rqstp->rq_client = NULL; |
@@ -430,7 +431,7 @@ svcauth_unix_set_client(struct svc_rqst *rqstp) | |||
430 | ipm = ip_map_cached_get(rqstp); | 431 | ipm = ip_map_cached_get(rqstp); |
431 | if (ipm == NULL) | 432 | if (ipm == NULL) |
432 | ipm = ip_map_lookup(rqstp->rq_server->sv_program->pg_class, | 433 | ipm = ip_map_lookup(rqstp->rq_server->sv_program->pg_class, |
433 | rqstp->rq_addr.sin_addr); | 434 | sin->sin_addr); |
434 | 435 | ||
435 | if (ipm == NULL) | 436 | if (ipm == NULL) |
436 | return SVC_DENIED; | 437 | return SVC_DENIED; |