From: Volker Lendecke Date: Tue, 12 Aug 2025 13:06:39 +0000 (+0200) Subject: smbd: Switch from a != to a == X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5007dbbbc9d35c57a773cedd9882d5c33e60fbbf;p=thirdparty%2Fsamba.git smbd: Switch from a != to a == Simpler to read for me Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 764da7dd7b3..b9df0145dd2 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -3106,11 +3106,13 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req) req->async_internal = false; req->do_signing = false; - if (opcode != SMB2_OP_SESSSETUP) { - req->do_encryption = encryption_desired; - } else { + + if (opcode == SMB2_OP_SESSSETUP) { req->do_encryption = false; + } else { + req->do_encryption = encryption_desired; } + req->was_encrypted = false; if (intf_v->iov_len == SMB2_TF_HDR_SIZE) { const uint8_t *intf = SMBD_SMB2_IN_TF_PTR(req);