Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1074812ybl; Wed, 14 Aug 2019 10:17:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfae4z7E/kMuSeKN+h0Gq3mgVNlO6U+R7s1ciiQucI2r74Z8Y8oKAYdkXwMK+MKO19co9m X-Received: by 2002:a62:6dc2:: with SMTP id i185mr1077569pfc.40.1565803028969; Wed, 14 Aug 2019 10:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803028; cv=none; d=google.com; s=arc-20160816; b=h8HYAJeC+holTD4yPyUPDl88ruV5+gZTo/jCGrf6vSQehp9HWsa9VIY3L29y6Clrgx kR4cidoBllHbN2SPUNOxKb3ZBUfNKvRijZaMX8XDRFELrYYWP5Y27MfwNqevChTv/XvZ fnJ/qDCAZ47icfU7pKlNNKu5O2onduLPEftCMeJdOSz5Bj0jEPD12vxdddXGLb2uvvPU p+4V6DBNuT1nrOqgvsTzk6b/QsavfxOBW8N2ypYI7ccyZBfJQawmsyOGjCUBG7zrR5Yi IETddDWr3CLRGR+tpOtzhloJiMMHgdeNZ2RcrQi7sqFlwWbh7QanVuoE/azAB5gWhho6 p/WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y5Z/YZ6Jf6leBhnUfHj2W6ylDLCvJf6DUkP9xTxjkdg=; b=QrtLTeIzH/KHGt+0jnI7By7e6TqFC8C7VcwQGL6Ab4anFJi+IY27uTmcfy9ouR8xj7 sWvT23cYbZNzAFqpd80mdSzbmNRkLcjYO2jSGw34dIu8uOPGuaCDMaYdZvopj2sdTM/S 8usNyledqgTiOmMyrLFi8F9EMGvQk0cjGiI8xI6APxnRs9LyqUW+FDTJaM7+k0m/fu2E MA0ahuSEGoN0B3036mwEF78P3ecPswrGqiLxwX3Zw2Wp/QmFuthqswZaft4KwNGDebbt x5mFc27aP4x7/RWyN14KlrfhXx009X2TCmzQC2f3bK+DigAvXt4IACjZmJsiNtqMzvah K9dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VMCnzwvr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si84655pfc.85.2019.08.14.10.16.53; Wed, 14 Aug 2019 10:17:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VMCnzwvr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731125AbfHNROo (ORCPT + 99 others); Wed, 14 Aug 2019 13:14:44 -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;