Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11793430ybi; Thu, 25 Jul 2019 23:36:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzV1EOPWGtomXTiumcIweJOB3eKlHom5YMCEN2GpOklePUS62DO4tystD8fRZYtQCJWzWRq X-Received: by 2002:a17:90a:220a:: with SMTP id c10mr98184013pje.33.1564123010116; Thu, 25 Jul 2019 23:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564123010; cv=none; d=google.com; s=arc-20160816; b=TGZNRAEZMV9fs6o+VQvRKgiGGnGT6njd08WWIQHyw/t/u/EAJDChp5u/rFyrkk1IKA LkfVl5WTCx70R4NpCZSIlEkcXUhhYt/k8ZgMSy8dFcgDOHZIpsnyvIy2CKHQB6NgXrpw 2q/InGnklS6QhdQQxIfQa3wN/acc/XEE6asOyVQkjzrtvBnnQO0NzNI9lfwRRsD6+dvb RqvNIAipLM+zEbPZ6nOFzkJs6qRy2jRopQgOQ7U5rJ9XEU7C+RSYJ8nIxdwFvf65raZU qgLWV4qJsWRMsjYEXgTQl3QzV08d0oUe5k86SU6Ta/zY91sTnJfObhERpN0O+KX2HR5c Bf2g== 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=0Gmv70kqY+eqmILzTv0nN5dI1a+Vaw/XdXAUkFr7fOA=; b=NLnI/umDxZSPgV7OV01a6S8ZikoxKQ5g7WT5bnT3xswoJGyGf2F45M0f2tVcDYh4Ae gVhFF6ojHOYVhtn3n2ag9i8N4tvfPguEyZLJRjnYWEdNSVScKAJq+Ixki6bvTHTGqQXx br9hoiVX84gFW79iMIiBJOzsWdwiONUjDSE0zALBhfznS21uFLfrFX0c9z66hMSK983R FclHANQUJ9l3FyGR2RLDlhI4OkJaXPXQuPmUXPMKUlOcuy1zKiR28qm3omv7fWNBjhAA ULXBU0Y0a6C1p0ARfddK1G97Q+vjb73rAVLcvzKnfQI480tKs3MAa8Qvbpi7srHmfANs o0cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=F4K7vahH; 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 v14si19452576pgl.386.2019.07.25.23.36.19; Thu, 25 Jul 2019 23:36:50 -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=F4K7vahH; 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 S1725925AbfGZGgP (ORCPT + 99 others); Fri, 26 Jul 2019 02:36:15 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:42414 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725864AbfGZGgP (ORCPT ); Fri, 26 Jul 2019 02:36:15 -0400 Received: by mail-lj1-f195.google.com with SMTP id t28so50366241lje.9 for ; Thu, 25 Jul 2019 23:36:14 -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=0Gmv70kqY+eqmILzTv0nN5dI1a+Vaw/XdXAUkFr7fOA=; b=F4K7vahHolEczcisajTjptIYdWs5MrL/jHOn1YaXAQfSVqICUU7iJSz7bHA//tPV0l e4bzdpXvo39VQFrPQ/tsXT9EOqphfWSxmNgZFxYu/y6mia/ZypZALpZgeb51tYHEqzwy eAg4rOE6De1qPfI5aIMZA3r6/Ag72DwH9Zt9LLNgey/tlKYZLSBnK3Xw2R3tp3W+RGIy qcrCOca/MiSz/+yiNW4bESAEm3oZE63cYtK93Icf9kbIXH+f+73Ki7ZAjmJfsoLtfKSy abtMnBVbYzkcPc/Ti9ZBUQTHruLjNaxGvMvtMJUoFEh1r/S43/e1MMLfMNeed9kysFwn ukOw== 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=0Gmv70kqY+eqmILzTv0nN5dI1a+Vaw/XdXAUkFr7fOA=; b=RsuHfA8DSptnK6t25xL0hSA6lSApXPrhOYKF6NH88Aibxezy78lAbVCogDWt+XY5Hi S9pJsPCYu/d2chvvz1Fn4t3C4kPmstZn2ewsuwxiVFbTzYbPRzW4fwr4I6bDgK6ZLrU5 7Owggs3ZY1wgPYtA+HcQbnn/KCkyoXdfhQpf3mPxSqSt+u6GU2lYdsJTDCGo5UpqEEB3 nB88vuswW4VRf2T1AVG5Lj7nhakRgd3EcJy5a5I8bnX5fv9Ca/PCNxdAxLlHhILVscfw 57g1nkQIBn4C4hY4fJwp7Siso1x67VAXCrlhosO1vt5SRAN3JDxIHJSzSn6NZzZW+JQn F26g== X-Gm-Message-State: APjAAAUmlRzGBDA4fZ/FmymhyrP3nmIh2L/K/Ed+IGMZ0UClq82J7vzh kHrQtG2MccRDtUhUPZMZlLDvopT7WRQ= X-Received: by 2002:a2e:3211:: with SMTP id y17mr11782616ljy.86.1564122973152; Thu, 25 Jul 2019 23:36:13 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id d15sm8039109lfq.76.2019.07.25.23.36.11 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 23:36:12 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v6 0/5] Use composition data to validate app against the Date: Fri, 26 Jul 2019 08:36:01 +0200 Message-Id: <20190726063606.19359-1-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 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 Thanks for your patience :) + Fix brace style + Fix comment style + Fix typo when assigning element paths in attach_req_node + 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 | 556 ++++++++++++++++++++++++----------------------- 2 files changed, 290 insertions(+), 268 deletions(-) -- 2.19.1