aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/svc.h')
-rw-r--r--include/linux/sunrpc/svc.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 52db9c8985c5..96c1b6ae7d96 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -200,8 +200,8 @@ struct svc_rqst {
200 struct list_head rq_list; /* idle list */ 200 struct list_head rq_list; /* idle list */
201 struct list_head rq_all; /* all threads list */ 201 struct list_head rq_all; /* all threads list */
202 struct svc_sock * rq_sock; /* socket */ 202 struct svc_sock * rq_sock; /* socket */
203 struct sockaddr_in rq_addr; /* peer address */ 203 struct sockaddr_storage rq_addr; /* peer address */
204 int rq_addrlen; 204 size_t rq_addrlen;
205 205
206 struct svc_serv * rq_server; /* RPC service definition */ 206 struct svc_serv * rq_server; /* RPC service definition */
207 struct svc_pool * rq_pool; /* thread pool */ 207 struct svc_pool * rq_pool; /* thread pool */
@@ -256,6 +256,19 @@ struct svc_rqst {
256}; 256};
257 257
258/* 258/*
259 * Rigorous type checking on sockaddr type conversions
260 */
261static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst)
262{
263 return (struct sockaddr_in *) &rqst->rq_addr;
264}
265
266static inline struct sockaddr *svc_addr(struct svc_rqst *rqst)
267{
268 return (struct sockaddr *) &rqst->rq_addr;
269}
270
271/*
259 * Check buffer bounds after decoding arguments 272 * Check buffer bounds after decoding arguments
260 */ 273 */
261static inline int 274static inline int