diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8dd6637a3cbb..51f272377ae1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2544,8 +2544,15 @@ static int match_server(struct TCP_Server_Info *server, struct smb_vol *vol) | |||
2544 | if (vol->nosharesock) | 2544 | if (vol->nosharesock) |
2545 | return 0; | 2545 | return 0; |
2546 | 2546 | ||
2547 | /* BB update this for smb3any and default case */ | 2547 | /* If multidialect negotiation see if existing sessions match one */ |
2548 | if ((server->vals != vol->vals) || (server->ops != vol->ops)) | 2548 | if (strcmp(vol->vals->version_string, SMB3ANY_VERSION_STRING) == 0) { |
2549 | if (server->vals->protocol_id < SMB30_PROT_ID) | ||
2550 | return 0; | ||
2551 | } else if (strcmp(vol->vals->version_string, | ||
2552 | SMBDEFAULT_VERSION_STRING) == 0) { | ||
2553 | if (server->vals->protocol_id < SMB21_PROT_ID) | ||
2554 | return 0; | ||
2555 | } else if ((server->vals != vol->vals) || (server->ops != vol->ops)) | ||
2549 | return 0; | 2556 | return 0; |
2550 | 2557 | ||
2551 | if (!net_eq(cifs_net_ns(server), current->nsproxy->net_ns)) | 2558 | if (!net_eq(cifs_net_ns(server), current->nsproxy->net_ns)) |