X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsunrpc%2Fsvc.h;h=4a7ae8ab6eb873e75aa2f14c59fc40332dd7da48;hb=de5603748af8bf7deac403e6ba92887f8d18e812;hp=83b3c7b433aa452dae0e1e79028ba29171c1b9c3;hpb=7baca6ad0ef09c8a78d798c93a3ce25336e8f50f;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 83b3c7b433a..4a7ae8ab6eb 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -194,9 +194,7 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) union svc_addr_u { struct in_addr addr; -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) struct in6_addr addr6; -#endif }; /* @@ -398,4 +396,23 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t); #define RPC_MAX_ADDRBUFLEN (63U) +/* + * When we want to reduce the size of the reserved space in the response + * buffer, we need to take into account the size of any checksum data that + * may be at the end of the packet. This is difficult to determine exactly + * for all cases without actually generating the checksum, so we just use a + * static value. + */ +static inline void +svc_reserve_auth(struct svc_rqst *rqstp, int space) +{ + int added_space = 0; + + switch(rqstp->rq_authop->flavour) { + case RPC_AUTH_GSS: + added_space = RPC_MAX_AUTH_SIZE; + } + return svc_reserve(rqstp, space + added_space); +} + #endif /* SUNRPC_SVC_H */