Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11256394ybi; Thu, 25 Jul 2019 12:50:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0ZfyHxr0tXGg4MkB25r64EiT8MlFH9st+ahxtvuj8vqt9ek7Sl6Kmb2/Q9ZBzyDG0xPdl X-Received: by 2002:a17:902:a60d:: with SMTP id u13mr93344898plq.144.1564084214744; Thu, 25 Jul 2019 12:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564084214; cv=none; d=google.com; s=arc-20160816; b=DQe388L/vZM/UsZf+wDr6/lTqgqcev9M/RhwWEu8/7pXSjvZJ6RYo3BdhWhqYmWVzj eoa5EnFrkvU8QsrYFWT+peILa/0XzGipYqLUlpW9nCmdKajgBdAi95OtKm1SErFvxa+6 73VzhtjTE/H3F9INz3nnEgV/g9gc/gbnX1huXIKvPjTwhyS5+aRCsU9S/UlXUEwXZgX0 +tpwTbmiXxV+aYREmdto56bruP8SJRnbVGzBtVpL3W9aD19t2pmf2dWmMxnQGHpU91Tn 71F/eXUR77UBX3Q17iH5TdIBvQ2+dKEXxieqXB7P1FSRlzBoNqdI8Zb3KVVjO7Z35lub s8lQ== 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 :message-id:date:subject:to:from:dkim-signature; bh=JuOXRP3/MzD3IO3WpGZZ3CFEeQA2VCyVLjzGYMbAM/E=; b=R2MMLsk5BruxlvMhp/NqHFUkf8/EUXyN9u/mA1263eKESh897rqb6wf23YGDV5y2Bk nyli4+hwOT5DR/o2w8ochEHFyXU9nxvoZCuBaQpMQiO6jWYLK78wvbzJ24FlKgSnw3qR R9scxd1pb/AbIKe5Ut6bMLIH+D8DCUMjMjACnDqaA12bvEeH2rMYnz7B7EK8K2m5k2WN GzmV2k1jgGzvA6atkVvEPFpiRBbfI6j0+67YfYC6msZp0Va4P3RtnlhF5ayM5r7ZPSPE 0DyXV4eDLrSLclQOT2ZZwrSxK7KfS4PPMU1mo75nOVwDluYaA06emmq2kM1XmWqUja5Y X9Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=mB5smMOD; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 i198si17307916pfe.228.2019.07.25.12.49.47; Thu, 25 Jul 2019 12:50:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=mB5smMOD; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726126AbfGYTtn (ORCPT + 99 others); Thu, 25 Jul 2019 15:49:43 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:42271 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726357AbfGYTtn (ORCPT ); Thu, 25 Jul 2019 15:49:43 -0400 Received: by mail-lf1-f65.google.com with SMTP id s19so35394576lfb.9 for ; Thu, 25 Jul 2019 12:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JuOXRP3/MzD3IO3WpGZZ3CFEeQA2VCyVLjzGYMbAM/E=; b=mB5smMODfjEyoI0cwNjfIdjgzSAyGBVYuluYuvGLw5OGxcHjOlUtMMmX2Tq+FOQVpT ahykHftUDOazpWsfHG7kv74EuKqVikb7cAH7dPA1yZAuZdpHtFsNnW1oJU+dfKgUjD8e yatZLjAavQXDtYvs0SviVUAyZRlpcwO+v0Mi/nI7bMvp0TIg4oJWYdy0d8FiWP9MQnRb erGFGnVuH7XiCw+eFyxVLA1L1KxQr6FLiuc9gbXuz66+5AAI/EBPy2D2C/L0C2042xsx OHZq+u04hlbIv7x0B2lw2X0VbJKI8dc0uOPY9jtp7T8rwx8iKMIkkUD+Wm+SIKuH/D2a xnlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JuOXRP3/MzD3IO3WpGZZ3CFEeQA2VCyVLjzGYMbAM/E=; b=MeKOA7LP4N5sP1jv40oen3vBH6bfpKmMUqcbqTxkziAn9Sdp9MLhvJ6SCV19j/LOgW K3SL+CXcf4kYxBM1Tt+/eOxpyxzVQnKv69lzsvz9efv7FD9GAohBVvJHBlnTF8fFwM1J w7JNZgfLsoiyylUnFNoM/x7k6ymNBKaKH/M5llkv4oR74TiRfXHb4kms6L9R5e/Wdq1k RTzbC0S5YKaIqO2BkNBgTDX2GY4waJH/wVPMWPehzrtHP+jorXf9M0klPxQ3UCjxju7S Zj0CMZ8DdmECae03cZTjfdThQilvmJj0AUJZKhmchnLIAy5zr+Ea6x8mZ4mXF2YXHcAh rkuQ== X-Gm-Message-State: APjAAAVxeJlVhGNh0cPs4Bln24RxUaxGJTNtBNYuyjoxsBDdZXTedLkn CqRAJfWh4y8YclzBhOb9ZRO46saP60c= X-Received: by 2002:ac2:4839:: with SMTP id 25mr42228536lft.79.1564084180632; Thu, 25 Jul 2019 12:49:40 -0700 (PDT) Received: from kynes.internet.domowy (apn-95-40-32-72.dynamic.gprs.plus.pl. [95.40.32.72]) by smtp.gmail.com with ESMTPSA id e62sm9327693ljf.82.2019.07.25.12.49.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 12:49:39 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v4 0/5] Use composition data to validate app against the node Date: Thu, 25 Jul 2019 21:49:28 +0200 Message-Id: <20190725194933.7321-1-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org + Fix setting app_path and owner during Attach() + Fix typo CompanyID property validation + Added comments about temporary node usage during Attach() + Keep element's Location property optional according to API documentation --- This patchset streamlines app validation by creating a temporary node during Attach, Join and CreateNetwork calls, then validating its composition data to: - fit in Config Model Composition Data Get message - declare mandatory models on primary element - declare consecutive element indexes During Attach call, temporary composition data is also compared with data generated for existing node, guaranteeing immutablity required by the specification. MichaƂ Lowas-Rzechonek (5): mesh: Convert void pointers to anonymous unions in managed_obj_request mesh: Validate application by comparing composition data mesh: Keep element and model lists sorted and unique mesh: Check that element indexes are consecutive mesh: Check that config server is present in primary element mesh/mesh-defs.h | 2 + mesh/node.c | 558 ++++++++++++++++++++++++----------------------- 2 files changed, 292 insertions(+), 268 deletions(-) -- 2.22.0