From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 634A2C3A5A3 for ; Thu, 22 Aug 2019 17:47:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AD24233FC for ; Thu, 22 Aug 2019 17:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566496070; bh=R+BP7NJ411RCZSukiwh8Wo2uoyrAea8561vGMjPlR8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kEoPH+sNXqCiywZuiBEADCm/oVh0NOgzqvNbBEvp1Zsp9hFsJd4wdT+1qFsUNfWow M10CNNXVfE4D6K5eO/b6UkqnXn+8SP2LZwDIAFdvFA/0CLcCC8+PDc4j5rmiz4CO6n gdu0515AVLqwlz06UmpUtPX+34METebs/U5zSOzQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391383AbfHVRWf (ORCPT ); Thu, 22 Aug 2019 13:22:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:40762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391312AbfHVRW3 (ORCPT ); Thu, 22 Aug 2019 13:22:29 -0400 Received: from localhost (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C44D8233FD; Thu, 22 Aug 2019 17:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566494548; bh=R+BP7NJ411RCZSukiwh8Wo2uoyrAea8561vGMjPlR8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DN2vxM6TJ2DhW6uq87CKwlyEdIcRBrzv6NOIffqZXqeKvhgWBSaQrnlBf6fMSWqOu n97lHkvIAFRSbrT+s+d54imgz0SytqzHjUdKt9nKEhNtCbGUkixXMUZxUFTaYsPSRu RJxT7G6mywhlO8E6vDXqRRkjDCsaQghIRzaNEpSw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Pavel Shilovsky , Ronnie Sahlberg Subject: [PATCH 4.4 30/78] smb3: send CAP_DFS capability during session setup Date: Thu, 22 Aug 2019 10:18:34 -0700 Message-Id: <20190822171832.916583468@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190822171832.012773482@linuxfoundation.org> References: <20190822171832.012773482@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve French 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 Reviewed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -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;