Skip to content

Commit 55d9cc8

Browse files
committed
libceph: introduce ceph_x_encrypt_offset()
Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
1 parent 462e650 commit 55d9cc8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

net/ceph/auth_x.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ static int ceph_x_should_authenticate(struct ceph_auth_client *ac)
3939
return need != 0;
4040
}
4141

42+
static int ceph_x_encrypt_offset(void)
43+
{
44+
return sizeof(u32) + sizeof(struct ceph_x_encrypt_header);
45+
}
46+
4247
static int ceph_x_encrypt_buflen(int ilen)
4348
{
44-
return sizeof(struct ceph_x_encrypt_header) + ilen + 16 +
45-
sizeof(u32);
49+
return ceph_x_encrypt_offset() + ilen + 16;
4650
}
4751

4852
static int ceph_x_encrypt(struct ceph_crypto_key *secret,

0 commit comments

Comments
 (0)