From 73df0dbaff8d0853387e140f52b6250c486b18a1 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Mon, 12 Feb 2007 00:53:35 -0800 Subject: [PATCH] knfsd: SUNRPC: Make rq_daddr field address-version independent The rq_daddr field must support larger addresses. Signed-off-by: Chuck Lever Cc: Aurelien Charbon Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/sunrpc/svc.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 96c1b6ae7d96..6d6892fa1d40 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -11,6 +11,7 @@ #define SUNRPC_SVC_H #include +#include #include #include #include @@ -191,7 +192,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) iov->iov_len += sizeof(__be32); } - +union svc_addr_u { + struct in_addr addr; +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + struct in6_addr addr6; +#endif +}; + /* * The context of a single thread, including the request currently being * processed. @@ -227,8 +234,8 @@ struct svc_rqst { unsigned short rq_secure : 1; /* secure port */ - - __be32 rq_daddr; /* dest addr of request - reply from here */ + union svc_addr_u rq_daddr; /* dest addr of request + * - reply from here */ void * rq_argp; /* decoded arguments */ void * rq_resp; /* xdr'd results */ @@ -308,7 +315,7 @@ struct svc_deferred_req { struct svc_sock *svsk; struct sockaddr_storage addr; /* where reply must go */ size_t addrlen; - __be32 daddr; /* where reply must come from */ + union svc_addr_u daddr; /* where reply must come from */ struct cache_deferred_req handle; int argslen; __be32 args[0]; -- cgit v1.2.3