summaryrefslogtreecommitdiff
path: root/fs/lockd/svc4proc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-02-12 11:53:34 +0300
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 20:48:36 +0300
commit27459f0940e16c68e080f5fc7e85aa9eb3f74528 (patch)
treef13cd1f2005dda2b6115e2afbc49e1271b0d374b /fs/lockd/svc4proc.c
parent2442222283918c2d1c20ae651d95fe168757938b (diff)
downloadlinux-27459f0940e16c68e080f5fc7e85aa9eb3f74528.tar.xz
[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 'fs/lockd/svc4proc.c')
-rw-r--r--fs/lockd/svc4proc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index 9b591bc18341..47a66aa5d55b 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -224,7 +224,7 @@ nlm4svc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
resp->cookie = argp->cookie;
dprintk("lockd: GRANTED called\n");
- resp->status = nlmclnt_grant(&rqstp->rq_addr, &argp->lock);
+ resp->status = nlmclnt_grant(svc_addr_in(rqstp), &argp->lock);
dprintk("lockd: GRANTED status %d\n", ntohl(resp->status));
return rpc_success;
}
@@ -421,7 +421,9 @@ static __be32
nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
void *resp)
{
- struct sockaddr_in saddr = rqstp->rq_addr;
+ struct sockaddr_in saddr;
+
+ memcpy(&saddr, svc_addr_in(rqstp), sizeof(saddr));
dprintk("lockd: SM_NOTIFY called\n");
if (saddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)