Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1069727ybl; Wed, 14 Aug 2019 10:12:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVi9iSudZMkUW5xkicv1YbunqZVXWn6jiRMhrcm0YXRI+ggxXJqULHkCUYeKrgYw/IBGcq X-Received: by 2002:a17:902:124:: with SMTP id 33mr418256plb.145.1565802751306; Wed, 14 Aug 2019 10:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802751; cv=none; d=google.com; s=arc-20160816; b=qV4KsA8v+KJGDLnBGJhBvOGFz67eIAan/z0RGI6WdF11k26I0Hw0Omh+F1Cu5kMS4Z DapqhObg5Q90g5mPXKMk+nnoacte0vNOytIchzhu3SJtSw1q2g9EwSRLtG+bNI4SOPGz 0vuPLv4rVbaubkkrnAkuR377E6OoyY2jVdmnKQre3han7EmNXvEcgVFN3XMSPQ+Yqxx2 azu3MKuzhSt1e4Oq97aajRaoNZtrmzamk0S61BFkr7si7U7gJB2Bmb0Vnw11zjN1IkeT iIlFt5x96BCWuqiOpuXFXlIznVsAzhPR5Q5CUf1HKf4O2Hd1BU05Tkf1HsCtQHTfQVLS U/4Q== 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=IryXzpV8FW4XGvpwQSoRUWPGjEex8T6eEWeM5fov1Kg=; b=sQAV7+tkrabqKziDQjwr6vEp94TZzCh6JP5UlhVYOGBSADzDdfFqREGlaYVwzsY1+M hdDByoyhOaBoAK77taLoKellWwqQ0B7f0i+ty6XPmtftQDMvi6KVN94NTW/ZFQixnQAI 0RgcvX66nhJDRYN945ubzpeiAluVstuVZwpO3kAGyi7eff4pFtRKBr43Qgt0KjbLGog8 e4dqUpnc1gL8XJCNv55tIEAd1K2RzDaHGipZ6UZV67yC/fbyiCeC30sIc4XKYZmSBJC/ +5h7WmxfSUaCV20R3JdQVUxDFXAIWdw7BFH2yqdTanfVQ/a+niK7U1egjiRqowZl0HaT RRiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EdO8G9RW; 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 h186si158662pge.110.2019.08.14.10.12.15; Wed, 14 Aug 2019 10:12:31 -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=EdO8G9RW; 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 S1730473AbfHNRLp (ORCPT + 99 others); Wed, 14 Aug 2019 13:11:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:35174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729958AbfHNRLn (ORCPT ); Wed, 14 Aug 2019 13:11:43 -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 4F8E72063F; Wed, 14 Aug 2019 17:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802702; bh=QDR3h7FfOBFrr7zGv7KqXDw32Werc2p/sPczydszZDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EdO8G9RW80mchy/JGXqAHayTyYp1UkvbJ+KEpEhJLLNjuHp3cPlcmin582aemLBri GT/LaEPPR6iLeBKT8oQ+CPfRPizsLNc5ywm3gCJx2ayj0GpwSBSEIXJKnDMdn8tOKj qzuFDcsUVI2SOmzGqkIzPL3W/YbWDihiUnR0LIc0= 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.19 84/91] smb3: send CAP_DFS capability during session setup Date: Wed, 14 Aug 2019 19:01:47 +0200 Message-Id: <20190814165753.592414915@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165748.991235624@linuxfoundation.org> References: <20190814165748.991235624@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 @@ -1006,7 +1006,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;