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 11EB7C32753 for ; Wed, 14 Aug 2019 17:14:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE1D1216F4 for ; Wed, 14 Aug 2019 17:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802891; bh=DOxNJoygQl/sn/2FO12FqUQxl5U5sdqG4oOVZJAjo00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qmxKZ3Py+vrh9Pphq5wJxDU0kgnATtuMWURno6S/DAWggiu8VSwN6506vka1Gjmam q7QU+EXNCrfrXf7Iz5EMLns/JChCT3KigfO4JP7p9bsndZp4TZgtUHrgscir3a60z0 h2pU1ob1kKNhJ0xzcp5draIddBuX10SzvpAHAG0g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731130AbfHNROp (ORCPT ); Wed, 14 Aug 2019 13:14:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:39138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730520AbfHNROk (ORCPT ); Wed, 14 Aug 2019 13:14:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 8B2BE2084D; Wed, 14 Aug 2019 17:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802879; bh=DOxNJoygQl/sn/2FO12FqUQxl5U5sdqG4oOVZJAjo00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VMCnzwvrzuSIn1Tf+WxMFJWQMzQJrRnarYOtsHQkVFZ3iqFyO7aC9Nd5l3wYK4pVw Vo3vnUeIeOQnS4r+E4y/3Q7WyNAHw2mfeV0X9/cJxmO2qkC6JmpAYLXvkbaWzlSFRA NZW7cd7V/MbP97UP+FOsvM8wtbOaO7k20J6O+duE= 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.14 61/69] smb3: send CAP_DFS capability during session setup Date: Wed, 14 Aug 2019 19:01:59 +0200 Message-Id: <20190814165750.069022327@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165744.822314328@linuxfoundation.org> References: <20190814165744.822314328@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 @@ -834,7 +834,12 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_ 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;