diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-04-09 11:34:36 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-04-09 16:53:56 -0400 |
commit | 06b332a52293a45324320b6b446a7fa677fb6702 (patch) | |
tree | 4629ff4b2eb7bdf85593db7d24f362a5561c9e59 /fs/nfsd/xdr4cb.h | |
parent | 55c760cfc40d75b4d8a17d56580ec306db2ab14f (diff) |
nfsd4: check backchannel attributes on create_session
Make sure the client gives us an adequate backchannel.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4cb.h')
-rw-r--r-- | fs/nfsd/xdr4cb.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4cb.h b/fs/nfsd/xdr4cb.h new file mode 100644 index 000000000000..c5c55dfb91a9 --- /dev/null +++ b/fs/nfsd/xdr4cb.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #define NFS4_MAXTAGLEN 20 | ||
2 | |||
3 | #define NFS4_enc_cb_null_sz 0 | ||
4 | #define NFS4_dec_cb_null_sz 0 | ||
5 | #define cb_compound_enc_hdr_sz 4 | ||
6 | #define cb_compound_dec_hdr_sz (3 + (NFS4_MAXTAGLEN >> 2)) | ||
7 | #define sessionid_sz (NFS4_MAX_SESSIONID_LEN >> 2) | ||
8 | #define cb_sequence_enc_sz (sessionid_sz + 4 + \ | ||
9 | 1 /* no referring calls list yet */) | ||
10 | #define cb_sequence_dec_sz (op_dec_sz + sessionid_sz + 4) | ||
11 | |||
12 | #define op_enc_sz 1 | ||
13 | #define op_dec_sz 2 | ||
14 | #define enc_nfs4_fh_sz (1 + (NFS4_FHSIZE >> 2)) | ||
15 | #define enc_stateid_sz (NFS4_STATEID_SIZE >> 2) | ||
16 | #define NFS4_enc_cb_recall_sz (cb_compound_enc_hdr_sz + \ | ||
17 | cb_sequence_enc_sz + \ | ||
18 | 1 + enc_stateid_sz + \ | ||
19 | enc_nfs4_fh_sz) | ||
20 | |||
21 | #define NFS4_dec_cb_recall_sz (cb_compound_dec_hdr_sz + \ | ||
22 | cb_sequence_dec_sz + \ | ||
23 | op_dec_sz) | ||