summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-07-25 18:13:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-16 10:13:57 +0200
commitfab3d4e7a2f220bc40f8e4680a7616bf422c944a (patch)
tree6c3c160db6907dfe6b3614f68c3c817f80059227 /fs/cifs
parenteaff94c5989cf7c9823211f6d5a816678ba4f7a0 (diff)
downloadlinux-stable-fab3d4e7a2f220bc40f8e4680a7616bf422c944a.tar.gz
linux-stable-fab3d4e7a2f220bc40f8e4680a7616bf422c944a.tar.bz2
linux-stable-fab3d4e7a2f220bc40f8e4680a7616bf422c944a.zip
smb3: send CAP_DFS capability during session setup
commit 8d33096a460d5b9bd13300f01615df5bb454db10 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2pdu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 97d916f9f0bd..0e1c36c92f60 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -834,7 +834,12 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
else
req->SecurityMode = 0;
+#ifdef CONFIG_CIFS_DFS_UPCALL
+ req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
+#else
req->Capabilities = 0;
+#endif /* DFS_UPCALL */
+
req->Channel = 0; /* MBZ */
sess_data->iov[0].iov_base = (char *)req;