diff options
author | Steve French <smfrench@gmail.com> | 2012-10-01 13:26:22 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-10-01 13:26:22 -0400 |
commit | e4aa25e7801163df058f62c617b859e9d3d4b148 (patch) | |
tree | 1c69663679f64f8a24c71cfe5efb2cbeb2ab4ee9 /fs/cifs/smb2ops.c | |
parent | c052e2b423f3eabe9f3f32e60744afa5cf26f6b9 (diff) |
[CIFS] Fix SMB2 negotiation support to select only one dialect (based on vers=)
Based on whether the user (on mount command) chooses:
vers=3.0 (for smb3.0 support)
vers=2.1 (for smb2.1 support)
or (with subsequent patch, which will allow SMB2 support)
vers=2.0 (for original smb2.02 dialect support)
send only one dialect at a time during negotiate (we
had been sending a list).
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 1570cbea4a49..4d9dbe0b7385 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -645,6 +645,25 @@ struct smb_version_operations smb21_operations = { | |||
645 | 645 | ||
646 | struct smb_version_values smb21_values = { | 646 | struct smb_version_values smb21_values = { |
647 | .version_string = SMB21_VERSION_STRING, | 647 | .version_string = SMB21_VERSION_STRING, |
648 | .protocol_id = SMB21_PROT_ID, | ||
649 | .req_capabilities = 0, /* MBZ on negotiate req until SMB3 dialect */ | ||
650 | .large_lock_type = 0, | ||
651 | .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK, | ||
652 | .shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK, | ||
653 | .unlock_lock_type = SMB2_LOCKFLAG_UNLOCK, | ||
654 | .header_size = sizeof(struct smb2_hdr), | ||
655 | .max_header_size = MAX_SMB2_HDR_SIZE, | ||
656 | .read_rsp_size = sizeof(struct smb2_read_rsp) - 1, | ||
657 | .lock_cmd = SMB2_LOCK, | ||
658 | .cap_unix = 0, | ||
659 | .cap_nt_find = SMB2_NT_FIND, | ||
660 | .cap_large_files = SMB2_LARGE_FILES, | ||
661 | }; | ||
662 | |||
663 | struct smb_version_values smb30_values = { | ||
664 | .version_string = SMB30_VERSION_STRING, | ||
665 | .protocol_id = SMB30_PROT_ID, | ||
666 | .req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_LARGE_MTU, | ||
648 | .large_lock_type = 0, | 667 | .large_lock_type = 0, |
649 | .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK, | 668 | .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK, |
650 | .shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK, | 669 | .shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK, |