]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb3: send CAP_DFS capability during session setup
authorSteve French <stfrench@microsoft.com>
Thu, 25 Jul 2019 23:13:10 +0000 (18:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2019 08:52:54 +0000 (10:52 +0200)
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>
fs/cifs/smb2pdu.c

index 8c1e8816e2a23238b2c0fb2bd210d51cd9b74cfe..84e60b3a5c7cd3d74d3596968aef0f1a820d17a1 100644 (file)
@@ -677,7 +677,12 @@ ssetup_ntlmssp_authenticate:
        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 */
 
        iov[0].iov_base = (char *)req;