Skip to content

Commit b53e8cf

Browse files
namjaejeonsmfrench
authored andcommitted
ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect
ksmbd returned "Input/output error" when mounting with vers=2.0 to ksmbd. It should return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect. Cc: [email protected] Reported-by: Steve French <[email protected]> Signed-off-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent be6f42f commit b53e8cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ksmbd/smb_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ int ksmbd_extract_shortname(struct ksmbd_conn *conn, const char *longname,
434434

435435
static int __smb2_negotiate(struct ksmbd_conn *conn)
436436
{
437-
return (conn->dialect >= SMB21_PROT_ID &&
437+
return (conn->dialect >= SMB20_PROT_ID &&
438438
conn->dialect <= SMB311_PROT_ID);
439439
}
440440

@@ -465,7 +465,7 @@ int ksmbd_smb_negotiate_common(struct ksmbd_work *work, unsigned int command)
465465
}
466466
}
467467

468-
if (command == SMB2_NEGOTIATE_HE && __smb2_negotiate(conn)) {
468+
if (command == SMB2_NEGOTIATE_HE) {
469469
ret = smb2_handle_negotiate(work);
470470
init_smb2_neg_rsp(work);
471471
return ret;

0 commit comments

Comments
 (0)