diff options
author | Steve French <stfrench@microsoft.com> | 2019-07-25 19:13:10 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-08-05 23:50:38 -0400 |
commit | 8d33096a460d5b9bd13300f01615df5bb454db10 (patch) | |
tree | ce78d625cb14e0f9ab67af127a80f69dac726f40 /fs/cifs | |
parent | 3edeb4a4146dc3b54d6fa71b7ee0585cb52ebfdf (diff) |
smb3: send CAP_DFS capability during session setup
We had a report of a server which did not do a DFS referral
because the session setup Capabilities field was set to 0
(unlike negotiate protocol where we set CAP_DFS). Better to
send it session setup in the capabilities as well (this also
more closely matches Windows client behavior).
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 33efc5fb293c..31e4a1b0b170 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -1196,7 +1196,12 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data) | |||
1196 | else | 1196 | else |
1197 | req->SecurityMode = 0; | 1197 | req->SecurityMode = 0; |
1198 | 1198 | ||
1199 | #ifdef CONFIG_CIFS_DFS_UPCALL | ||
1200 | req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS); | ||
1201 | #else | ||
1199 | req->Capabilities = 0; | 1202 | req->Capabilities = 0; |
1203 | #endif /* DFS_UPCALL */ | ||
1204 | |||
1200 | req->Channel = 0; /* MBZ */ | 1205 | req->Channel = 0; /* MBZ */ |
1201 | 1206 | ||
1202 | sess_data->iov[0].iov_base = (char *)req; | 1207 | sess_data->iov[0].iov_base = (char *)req; |