|
@@ -396,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 */
|