Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2011100rdb; Tue, 3 Oct 2023 07:49:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYp/qEcV+wq4Ap1NHMND1z1WMLnjXLvJXVzYxJ+YlKidV2ywLHAIYnMn4ajpTz1TEdzluY X-Received: by 2002:a05:6808:3ad:b0:3ae:55e5:43b6 with SMTP id n13-20020a05680803ad00b003ae55e543b6mr15970819oie.48.1696344591383; Tue, 03 Oct 2023 07:49:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696344591; cv=pass; d=google.com; s=arc-20160816; b=A4sNKSV9oP5ESXJkHpjEFTG5DN1Vm8SjXVVsjSvgSQo/U/W9gSrmbjmpnN1J7Nw9sA qyG/bHyiF3UG08hXD7F7yPZwtaONFkXpWTqDuq69HWzq3D6v18A3MvbsnJiOo+nihfs8 S12CXTHXEugjBrKxspUK1oKwzS4lzjmyfShI1wxAoDdHIIdIBsPsmbO94sw6vH5Wkk4G nYZpmUdPLI1fk+iQPE63lQz3mdpBYMskcCx+CfawS8X4H2ETIyDwhKgxDAva4esMsD6Z QrbeNmat6Tcat2ZjaW348/5d58ZSsWv0Lv/+Mj1HBY/KXON8jNYzg0OQYAoZN0pAsML8 APsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ECixQjPHC4ynBDHtIMoaTAv8GT8FLGlxCR2n/lPgoec=; fh=gOZmdXQWWYi2KI/CDlaL8bHElbVrtxjT8kPXxzTdvp8=; b=Sx27Zd2jdKLzf2M/ed5IgDUaHRWvVA4ci997KDhJ5fCEmZjDr03jruFqxAzVndc6M5 rqHRIziIoZkBq72H985Bwomn6dlMXuzsFjYXuHhmlf4bGTiFa1WfaS/0ELSJrhGSXDDU UWXnQu02Y8GvmIdLNZVPEHSVQ1SJJjBqctfPXHVrqqq1viNPQw1Pur6MmdT3hJ5msbf5 xHQVMmJ27dBlGz70ItalfRAArCEOfLoStQfjDGPC0ftIuT36Ui1QWa8lJ5nj/yO5wH/z 0ra7vWvWeK7JLbRyymOX5fGLK2kxBJsFQgdkckx0uYvFyAxTHyLiLS5FdTaONLdL0aRr 2wiw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dl5CvkSe; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id s125-20020a637783000000b0054405623a4asi1543332pgc.615.2023.10.03.07.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dl5CvkSe; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 616C881142C7; Tue, 3 Oct 2023 07:49:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240106AbjJCOtt (ORCPT + 99 others); Tue, 3 Oct 2023 10:49:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjJCOts (ORCPT ); Tue, 3 Oct 2023 10:49:48 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2073.outbound.protection.outlook.com [40.107.247.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AE79A1 for ; Tue, 3 Oct 2023 07:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wv/lvHFxV5RHNqxvUdmMxebojKiGmwaXAoSlqRX3EgSgQh6PeKHHhL9nIr68iR3crmofw0Hk2OkCz2DR55o+CThsYcDBAM3VF3JHcClOuRFy+fWtI0311vEE4OxPNsIkoWUMrCyQDmpqYAjw3E4aXdZkxulMr4Z0Gv5z9hcbwG9CMBZAsgdKF4CeQjKlKPDzaYaqa/gS6YUi2dSjokIgfdw9Z1byV0MLeCu3HQ3RKIWc++4+ZzqjMRVKnDde+WzZ6Fvc07sv7UjOwAWdo0gqkMOFXqkiyna8irR6AfRyYtEHUsGr4ULFjfQ0QBrbVoW3ZfIj/jfK29GVNTr15lD3Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ECixQjPHC4ynBDHtIMoaTAv8GT8FLGlxCR2n/lPgoec=; b=ZnSKZpcMugYPQ2JxB6vXZZuTVxfN/qAonfAuUL2mjI6p+3ZaFGWx+f4iEEbvExWaonFoRCkXdRsmQrbA/5XJF84m67qbFtdpRdYSNfrmLr3GyVWR/6vSlfZbi65QPkWdhjVNOi4LwdI1S84kpZJTQX9cjPRhd3S2Urq5k/VyPGk/cZZ0SmLRdpFzZtMwauzMAX5anli+kAtxVHuNSPeOKpjGZ72y6PvYnP6yqw/fo5r3F+Sx16nWK+0CGlyok3wCSLZTsdkBul51wvClavh7N1QYluL5hbggW8lW4Hyc0rSie6XeIGaLlBbChMk+XjRFqUeH6sTrbURDFLMBOD05IQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ECixQjPHC4ynBDHtIMoaTAv8GT8FLGlxCR2n/lPgoec=; b=dl5CvkSeWLUbvpOIh1I/YvZ0JRUizOzE5/8YzbCF2qZMwZmyNXS/uWUN5zVZBRHp66kStZyES9PWRRlKc308Tqft6OVrTJnMn825N1slSs3Qo5bOoRKLNoDbg3MyV1JxkGbAv5lIkFsnjMgB32AQdVBPKKG9sJcQ+VtzVmt7/1U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by VI1PR04MB7104.eurprd04.prod.outlook.com (2603:10a6:800:126::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.31; Tue, 3 Oct 2023 14:49:43 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7763:779b:1a89:47da]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::7763:779b:1a89:47da%3]) with mapi id 15.20.6838.024; Tue, 3 Oct 2023 14:49:43 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH 1/1] Bluetooth: ISO: Allow binding a bcast listener to 0 bises Date: Tue, 3 Oct 2023 17:49:33 +0300 Message-Id: <20231003144933.3462-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003144933.3462-1-iulia.tanasescu@nxp.com> References: <20231003144933.3462-1-iulia.tanasescu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR07CA0298.eurprd07.prod.outlook.com (2603:10a6:800:130::26) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|VI1PR04MB7104:EE_ X-MS-Office365-Filtering-Correlation-Id: f7252661-984e-4239-591b-08dbc41ffab5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kF5XYU5WRI3JxgUMba8aoK8/ZC54IPWSbNTPKlGiUf2opQ4yYXIe9UXAjnZthf6gk1ItIYrDPSRs3l1aZF0bG15Cxhx8PkyJ1+7dt5gPhaXO594gMIlB1p+mvFB2aKHqbkIFjzGS005/5sh0tFd3XliNSdNSIKOSEovWV1AO1DVtmUpVjXZOwk6tuKoFX3h/pwH0Wwbuijx4JoxE8m0tNoZPKDd+toDSz8JRdUxM6UDtKhgmnthpZ5hmrUzQUHL9VqkZoDiEW8gwYi7GB/LpaIFbIpegCrSk9CALrmfRGCJCaUI7iilYTOrO+xPzJEKLlJvmGRG4ij7xlh2zkyIWdcMbYmicCCYwJHn0FfDSf4UOsYVCr90eMOwq+VVWUnuMgoc0pkzLXpKYPdGUjHPOSDdRzhkT4pxUuJ1UGex45pIktKOMUI1q0RPlCuiaM/gzF696JMjWfKaVc4m3qHH95CYGdI5ta4mePmqQUrCkCXzejiUdgr0K5zNbgBhvfO8vCQj492bkwkXrFztL02i0WaaBw1OiTlA0HP5SM0VCKVtECNn/PA5HAkY0wyORDeUbXFk1OFUhukziG1PTipE4WUNm6VH9cp7ossu4wUAIhGB2jcjP3f8F5r8/TQOvD1aA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8898.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(366004)(346002)(396003)(136003)(376002)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(66946007)(66556008)(66476007)(41300700001)(6916009)(316002)(478600001)(38100700002)(6486002)(2906002)(8676002)(86362001)(4326008)(5660300002)(8936002)(44832011)(36756003)(83380400001)(6512007)(6506007)(6666004)(2616005)(26005)(1076003)(2013699003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m0Y2ppBT0NY+t+H93jmHqV9vGYgqx7IxPvsFdw1zYX2t7594jEgKqQ+A6iY9?= =?us-ascii?Q?a9WEv6SkikuHDLJMzTFJaadQh3t8GZA3vhW4fXYU4LedEYcoToTPc8IyI+i0?= =?us-ascii?Q?luyUySBqC5q7SnYDxd5tWymrjI5NA50LDJ2MrbcjSfNT50hRBxyTi5LpBf7R?= =?us-ascii?Q?Ty0MHV1p3egdIr8g1YEOlCDlYWU3JvwA9pP6gHDfHdtCZn/ycWXQuDi2X8R7?= =?us-ascii?Q?D8Fq1QZXbGlD2WIkXdvhBF9lTbntDe6FuRgW3Z3EASqiw3Dr6bUqKeVuKZ8O?= =?us-ascii?Q?XBCXwZhyZi0Gn/DFb3UZ31vJ9VqFRJayoJUNi/bnstWLWRH5wbKt7F0weGXx?= =?us-ascii?Q?m52bJouob/z9t8tDZcDObPn+SgZ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FDi8v0yBpdBdUUzZQOTNYBib/bN08okhGgryVgvxIB4HWGqsgbowjfwVk?= =?us-ascii?Q?vRrPmZEbO7R37pYw+9SbdBuQLPQ/FbqbI6o+FF5exQZgTGFnw+n0VXK/23tA?= =?us-ascii?Q?A31PshlUj3yLwRa4jZ+ttNO2Rb7QxSHgG802pVyBsyYyCE+CEcid/UEtKin6?= =?us-ascii?Q?MowT5d5WiZnZXb7ezZFosRbggcIqvrF16ioSaUB9Db9vH8oqGOKNTN0GzDQT?= =?us-ascii?Q?HMbgb9Mz9heWasIb0xNoB8Bfs4BrvtwhnK8qhzcSuKDmc0SLYAPO1p6FXqGn?= =?us-ascii?Q?PahCfRaX5mxV7d7JfC4TkHOXWnLTvNfKGyX2mvkEhbEyAYzrtAnTpqp1nD9f?= =?us-ascii?Q?9g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7252661-984e-4239-591b-08dbc41ffab5 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2023 14:49:43.3142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gn3ut3JEokKBzxVYkZORce7x6mQh5KSUCAZbtjefBReafGa4usr44dSqnzWy2hArVlL1HT7jSnw6S74CaJsCnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7104 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:49:48 -0700 (PDT) This makes it possible to bind a broadcast listener to a broadcaster address without asking for any BIS indexes to sync with. Signed-off-by: Iulia Tanasescu --- net/bluetooth/hci_conn.c | 2 +- net/bluetooth/iso.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index e62a5f368a51..c4395d34da70 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -2138,7 +2138,7 @@ int hci_le_big_create_sync(struct hci_dev *hdev, struct hci_conn *hcon, } pdu; int err; - if (num_bis > sizeof(pdu.bis)) + if (num_bis < 0x01 || num_bis > sizeof(pdu.bis)) return -EINVAL; err = qos_set_big(hdev, qos); diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index 2132a16be93c..8ab7ea5ebedf 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -790,8 +790,7 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr, BT_DBG("sk %p bc_sid %u bc_num_bis %u", sk, sa->iso_bc->bc_sid, sa->iso_bc->bc_num_bis); - if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc) || - sa->iso_bc->bc_num_bis < 0x01 || sa->iso_bc->bc_num_bis > 0x1f) + if (addr_len > sizeof(*sa) + sizeof(*sa->iso_bc)) return -EINVAL; bacpy(&iso_pi(sk)->dst, &sa->iso_bc->bc_bdaddr); -- 2.39.2