summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2019-01-09 15:17:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-13 10:03:50 +0100
commit90b7f94812437be10cc3e81bfa10e6c9b6a2e5e2 (patch)
tree020cd44a9b792f42322fcf4b07cf8d10f90455ab
parent5d1a7cebad586a3194b1e32240c280769d9494ed (diff)
libceph: fix CEPH_FEATURE_CEPHX_V2 check in calc_signature()
Upstream commit cc255c76c70f ("libceph: implement CEPHX_V2 calculation mode") was adjusted incorrectly: CEPH_FEATURE_CEPHX_V2 if condition got inverted, thus breaking 4.9.144 and later kernels for all setups that use cephx. Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--net/ceph/auth_x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c
index 29e23b5cb2ed..a4896e4a1c9a 100644
--- a/net/ceph/auth_x.c
+++ b/net/ceph/auth_x.c
@@ -804,7 +804,7 @@ static int calc_signature(struct ceph_x_authorizer *au, struct ceph_msg *msg,
void *enc_buf = au->enc_buf;
int ret;
- if (msg->con->peer_features & CEPH_FEATURE_CEPHX_V2) {
+ if (!(msg->con->peer_features & CEPH_FEATURE_CEPHX_V2)) {
struct {
__le32 len;
__le32 header_crc;