diff options
author | Steve French | 2019-07-26 01:13:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-08-16 10:12:52 +0200 |
commit | 898c19f1b4c8b9429dee99e3fdbc2cfa2464eb60 (patch) | |
tree | c289bf3a3502a77f5a2ec03fe6f191e96ce76286 /fs | |
parent | SMB3: Fix deadlock in validate negotiate hits reconnect (diff) | |
download | kernel-qcow2-linux-898c19f1b4c8b9429dee99e3fdbc2cfa2464eb60.tar.gz kernel-qcow2-linux-898c19f1b4c8b9429dee99e3fdbc2cfa2464eb60.tar.xz kernel-qcow2-linux-898c19f1b4c8b9429dee99e3fdbc2cfa2464eb60.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')
-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 55502bb6dee8..2bc47eb6215e 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1006,7 +1006,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; |