Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10821126ybi; Thu, 25 Jul 2019 05:45:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyN/JOZi4gYt4LtlAPGgdck5NyLWYoB/Wa78UnIlRO4vMbbVaam86/Rl3/dOlDRYO6xLW6c X-Received: by 2002:a65:5b8e:: with SMTP id i14mr84933530pgr.188.1564058701898; Thu, 25 Jul 2019 05:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564058701; cv=none; d=google.com; s=arc-20160816; b=0or5/Q6z13QHjiaYLQhuayoS/VX0dhPI9WFiNLkWBH/TfBmvJice1XLuHXWr0vW+oP ofUq4eGPkwmQ6awIot++fqXDa/kC4FoB5KD5YttnQKMcRwFASj+XHKgifqyHuwF7h7Rg gCDCdeVXxag6aKKZ4BvGt2gCdgqHZqZ0Y3rf2aB+JtWHL+TxGhQg0R5U84BY0bkOE25Y e2M84sCNUz+6MEP581wEi92/sc9SQn4F75Y9/WYdriG8e7aiAjHTjVaWe2R8TCIJg5oo y+Kx7Oz8s+LLkJihyUKoHoj/yyF6KYRJdUNokWrdqBcT71zifyFY1kE3y+CkoYDnYEPX nThA== 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=QK6Z4RfAz2t++26opWLcEAB3MJHzW+7POBWdF/vUYnQ=; b=iXosnz9uKShj39ZjIvJCUankp6z5mVHKjvjv0MrQSdqkVzq5LAQNx5l8dT3fpT68dI 38yPaS2bDhZXiv8Q4FRFiMWw3wbelU7TmE/5690aUk8Q6jT46hJcOJN6P47zDFZXrydU LQ5d1Gl5axxeYRJE6U8VmtvvHGNpZDx8my34rfFJfSzKlsAVYbUQ0z4rNUDX+NeqTnfM nfNBLeRtWvZqKZAsiOFsGLgiRKvfWGa2ABVNUUyu8NcSQp8VzHFHDyqWljNJSk3lIWV3 5eiZzwo/3XX0lp7gcaO3Ai8REtc5mI8GCD4rod/WidUCdmH53LX5pI020yPzAhdP0hTS 9+SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=Nt9IZajW; 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 x131si19690573pfd.116.2019.07.25.05.44.35; Thu, 25 Jul 2019 05:45:01 -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=Nt9IZajW; 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 S2389209AbfGYIOe (ORCPT + 99 others); Thu, 25 Jul 2019 04:14:34 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37370 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388497AbfGYIOe (ORCPT ); Thu, 25 Jul 2019 04:14:34 -0400 Received: by mail-lf1-f68.google.com with SMTP id c9so33819986lfh.4 for ; Thu, 25 Jul 2019 01:14:32 -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=QK6Z4RfAz2t++26opWLcEAB3MJHzW+7POBWdF/vUYnQ=; b=Nt9IZajWuMd0QOC33zvzhfbPhR7Z1+IXI5WdJ7nH+gNcUI4pQf5tVUGgFv1kMbCde1 1pIyNhfSceBKAdDDffozSR74sYnTXQjxRU4NgNXveB7EKCIHnuoL05VVVXtunsbNF1bM j/ksZMeyxaf32IHJmByHzrEOI820l622jfE1/BIxPHKDDv/jlSeJgzToTkIe3KoYCmZ8 UtKlnM45sDyJUmXS8VgQrSVkiur/p+HPJ6ofGM5jnjUlLpCXbb1U7sxRh8Lb6esaY6Tb QNdJmDDRP1A/zj1IiSQoZqly1eh5685aKXC5RO7iM8MmfYmK563+bTECjALPhUUyKn2z eK7w== 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=QK6Z4RfAz2t++26opWLcEAB3MJHzW+7POBWdF/vUYnQ=; b=K8qVi1Hbqas5zhO81gxGSDBXuuI9ggpr1KafPTCleVef0Um7atAez5EGR/7sx/7U+3 7NZbSd93CJFLTOVBpCV7wGBTfXGOPXFEPiBzg8RzK0+MgaOcBBDhCUqlSezVQGMgzDcK PerHBzIE0xMzX2Jn9XMa2S/N9gmNjX/E4JIGt++bXAQikEPbprhsYrcI5NDYfOJzRQEr XN8Q67Nq3dqZmg8iFbKRo/nFUmXgxVqJdJmnULerLWfLVtIm3sYCjSiwrzAxg7ewSLLJ g75AZWUYelj4El6jEz5aKKeVlq0t6Skt68PJVQBqAnONqE/X24KR/KrL135MkB2HnIhW HRIw== X-Gm-Message-State: APjAAAUD8t/1BnQr07EHlgGd+2Izo1pR5camS6BggVMGIHTHRIAoOihH KYkTCcY6UvzdrdiEruS0OlkR8fIORwk= X-Received: by 2002:a05:6512:51c:: with SMTP id o28mr41963939lfb.67.1564042471266; Thu, 25 Jul 2019 01:14:31 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id 199sm9015251ljf.44.2019.07.25.01.14.29 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 01:14:29 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v3 0/5] Use composition data to validate app against the node Date: Thu, 25 Jul 2019 10:14:19 +0200 Message-Id: <20190725081424.22621-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 + 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 | 547 ++++++++++++++++++++++++----------------------- 2 files changed, 284 insertions(+), 265 deletions(-) -- 2.19.1