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=unavailable 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 7A14EC32753 for ; Wed, 14 Aug 2019 17:07:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 506322173E for ; Wed, 14 Aug 2019 17:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802460; bh=8QzhLk11rKRS5pXk/KgrvZ/Uoumn2RD4aDet7Rx990E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=oa09pfjjAXh+yg/FGqj1HH3zU5nyi/YymT+YufnbVHheECwrtJORiw+dOBqjgiEoO iJrrkjJxJHOxHwuZerQ+35xXxhZEFgKjq+LrM/dxQ2GUiVnsUyd+TXw8CcWIi/Ne/I EpJNwozl/Ljb1ZlO04GB6xgieyNJGaOkw3xUKZKc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729929AbfHNRHi (ORCPT ); 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;