Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1082126ybl; Wed, 14 Aug 2019 10:24:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdqcQtt8qjF7JejrZ94+311gHRyBn9qEN597FeRk4LlTBbEuUBLgy1lbpV/w5HNesi+lEE X-Received: by 2002:a62:2aca:: with SMTP id q193mr1038867pfq.209.1565803458507; Wed, 14 Aug 2019 10:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803458; cv=none; d=google.com; s=arc-20160816; b=sqzIylPDU+4BjJIzc2aBCD6o8KhylYKOaU5s6SZUTG8aQxqHfkLaFwJr5zH7spbo2D S6JoTFAyEj3fIAGUZ67l0ErW2phhMvtruOm3lYyM6K3uMJEhYf+u5KBUvjIIKZfai+la MK+/GEPKaSKxcOTSxUuZ6KCP3EdnbBmQbJVcYiN49xwGzzH9eSt3Oc7tqG2gF3Wm6wuP uEb4ug5aXT2CAnhlIe/LqTlsgUXHO8d9gIoXahRoCKoO2I2MCAcc9P0AbNHs2vjvyAG3 WUuLaEUqRDm+XChdFKjRdJmam+B/eaftGeEyG93rmz1r3H7XPI53a1I8LScxj8EsRZgm yJeA== 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=v2txjz3vJBWX0kuHK2vICUq5Nfnz8yx/zyP4EzQGHs0=; b=oIF0b8kqCvCWYMXppwYOWdrx7uq/XGQxdbr9zmbAUUN4obDYmSh4bmPtRCrYvKQ2V1 2d483vaRzhfis99FJqcdTEsuvrJRtZZzeP27TgNylON2kZPwQ4zOqvNBb4sQK27Iyi2i LCZvjj4iG5fuaQl745yqga4kvRDChDCmLTzDoWUQdH8LHxK7nOM6QA1o9YjWCl9Y52Yn sx8T2rkEEW1tOVyGyjmxb25RqV5IA7uUpsJ6BqeOYbCWEU/YAtEexY0D6Uyac1NO1dpf oUP6exbLz+SdYLvJ3mBYOOjDRF17InGDDaaD/YWcNs+0zw9ymQGsvhGmPiMfZuvIO2Sp 7Vng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I1fVFpBG; 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 a19si195847pgv.180.2019.08.14.10.24.02; Wed, 14 Aug 2019 10:24:18 -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=I1fVFpBG; 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 S1728859AbfHNRHi (ORCPT + 99 others); Wed, 14 Aug 2019 13:07:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:57150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729921AbfHNRHf (ORCPT ); Wed, 14 Aug 2019 13:07:35 -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 671EC2084D; Wed, 14 Aug 2019 17:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802454; bh=8QzhLk11rKRS5pXk/KgrvZ/Uoumn2RD4aDet7Rx990E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I1fVFpBGsB3eOgucjCI5EWG1nqS88N1+JqYzi4wSRTjjMrVCXtj9DYhZizthlht2z EoWC1W1VEvYj3zEPR/dJmlFkfLyp63K4nBrHgD5QmRlP1GL1apW18tb4vASjBJ4wAe 9o4yvepdykv5I76b9NFOnzUfJYnHokfoBSwkjA8U= 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 5.2 133/144] smb3: send CAP_DFS capability during session setup Date: Wed, 14 Aug 2019 19:01:29 +0200 Message-Id: <20190814165805.506257564@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@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 @@ -1173,7 +1173,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;