diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-12-02 16:35:07 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-12-12 23:09:19 +0100 |
commit | 55d9cc834f933698fc864f0d36f3cca533d30a8d (patch) | |
tree | f4da2db2a0ac28189e3a4e27fb8b9f753824ca9d /net/ceph/auth_x.c | |
parent | 462e650451c577d15eeb4d883d70fa9e4e529fad (diff) | |
download | linux-55d9cc834f933698fc864f0d36f3cca533d30a8d.tar.bz2 |
libceph: introduce ceph_x_encrypt_offset()
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'net/ceph/auth_x.c')
-rw-r--r-- | net/ceph/auth_x.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c index 28bde937d58a..de30c585c2a2 100644 --- a/net/ceph/auth_x.c +++ b/net/ceph/auth_x.c @@ -39,10 +39,14 @@ static int ceph_x_should_authenticate(struct ceph_auth_client *ac) return need != 0; } +static int ceph_x_encrypt_offset(void) +{ + return sizeof(u32) + sizeof(struct ceph_x_encrypt_header); +} + static int ceph_x_encrypt_buflen(int ilen) { - return sizeof(struct ceph_x_encrypt_header) + ilen + 16 + - sizeof(u32); + return ceph_x_encrypt_offset() + ilen + 16; } static int ceph_x_encrypt(struct ceph_crypto_key *secret, |