Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:11 +0200
commitad787d132c77481fc8fcb21d4a8c480b21774c20 (patch)
treeedf9ef111199e7dba1d7903168a183fad7fb9085
parent50e54b4b1027c0faefca9a0865b038b900d3c80d (diff)
smb3: send CAP_DFS capability during session setup
-rw-r--r--patches.kernel.org/5.2.9-133-smb3-send-CAP_DFS-capability-during-session-set.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-133-smb3-send-CAP_DFS-capability-during-session-set.patch b/patches.kernel.org/5.2.9-133-smb3-send-CAP_DFS-capability-during-session-set.patch
new file mode 100644
index 0000000000..2a9f5e4f95
--- /dev/null
+++ b/patches.kernel.org/5.2.9-133-smb3-send-CAP_DFS-capability-during-session-set.patch
@@ -0,0 +1,45 @@
+From: Steve French <stfrench@microsoft.com>
+Date: Thu, 25 Jul 2019 18:13:10 -0500
+Subject: [PATCH] smb3: send CAP_DFS capability during session setup
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: 8d33096a460d5b9bd13300f01615df5bb454db10
+
+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>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ fs/cifs/smb2pdu.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
+index ee8b1452ddbc..c3c8de5513db 100644
+--- a/fs/cifs/smb2pdu.c
++++ b/fs/cifs/smb2pdu.c
+@@ -1173,7 +1173,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;
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index d4204ac0b2..1fc457463f 100644
--- a/series.conf
+++ b/series.conf
@@ -1153,6 +1153,7 @@
patches.kernel.org/5.2.9-130-mac80211-don-t-WARN-on-short-WMM-parameters-fro.patch
patches.kernel.org/5.2.9-131-dax-dax_layout_busy_page-should-not-unmap-cow-p.patch
patches.kernel.org/5.2.9-132-SMB3-Fix-deadlock-in-validate-negotiate-hits-re.patch
+ patches.kernel.org/5.2.9-133-smb3-send-CAP_DFS-capability-during-session-set.patch
########################################################
# Build fixes that apply to the vanilla kernel too.