mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
2442222283
commit
27459f0940
10 changed files with 51 additions and 28 deletions
|
@ -421,6 +421,7 @@ svcauth_unix_info_release(void *info)
|
|||
static int
|
||||
svcauth_unix_set_client(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct sockaddr_in *sin = svc_addr_in(rqstp);
|
||||
struct ip_map *ipm;
|
||||
|
||||
rqstp->rq_client = NULL;
|
||||
|
@ -430,7 +431,7 @@ svcauth_unix_set_client(struct svc_rqst *rqstp)
|
|||
ipm = ip_map_cached_get(rqstp);
|
||||
if (ipm == NULL)
|
||||
ipm = ip_map_lookup(rqstp->rq_server->sv_program->pg_class,
|
||||
rqstp->rq_addr.sin_addr);
|
||||
sin->sin_addr);
|
||||
|
||||
if (ipm == NULL)
|
||||
return SVC_DENIED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue