Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2496958ybi; Mon, 1 Jul 2019 13:00:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7kSW0YmmJyGdKnsLB90jCG1aH3riq8OTU2golNQHSNOyYnY6Y/POXxniBqHvnKrOGvz24 X-Received: by 2002:a63:3f84:: with SMTP id m126mr25206048pga.213.1562011254505; Mon, 01 Jul 2019 13:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562011254; cv=none; d=google.com; s=arc-20160816; b=Y1iXm73xGgT4qEqhcfwaBMybg492NJl0DQWPphVval0EE22CCpF0pGITMa3F81+skk ubo46z5UKps86+IYZm8T67ZfFkfnr0uVI/9s0CxaxBNoirEYZyiThdYyuDNyhRd1N8O9 v3LypIYVo1MVg9h93Sd/gpSgqiC2C8isHLPUzVhN3W91JMCP5Zf301TJ3U6rNnmIbjQj 9bQMidWSkKNitGE1rk1/mW6Y/IeVY3rSppaklgWyQ0p4rlIayZO7Hq9zOPzcez0zx+RR 2m9TdSW3eDJb81hVbgcEtvHdBpg17SgejXyhxThPLjcx8oCgBrsC3quNjiPRVAjZaz1J fb+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9UU94f82JSzX3YHKOwlgRBln+7Hg6rn7BOoVRDULvnk=; b=kKKPUWAERRVQ+IdLiYpq5o00x05grSghVSNdbLB7UsQVMtRRPeH7IvtLtHXgTnEn4S KF9q4XUjGU39vph6SPI0botOxKXZxlBKlDxofbBKmb+5F67AMeyqHtsf18ElcArg0sY0 6yt9ISS3P+dF1oxt82Lx65iS7qUP9fq0NlGgvXfs29FMm52/pVVVfwCArIx/I7jgnvnj u15wse7xrf6gOsckU806R/00PFLHRnJDDaaoc948/9inuOCD4KxblgLCHKmvH0CGT5pL I/DF+K5SDKmOqR2CQxSJjvwtmCCfdwFO2nVuFMSUNh8CxErfrvTw/7Sq1PDC415MaxkE TQEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=G9H3Ri65; 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 18si10960816pgb.104.2019.07.01.13.00.31; Mon, 01 Jul 2019 13:00:54 -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=G9H3Ri65; 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 S1726605AbfGAUA3 (ORCPT + 99 others); Mon, 1 Jul 2019 16:00:29 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38744 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbfGAUA3 (ORCPT ); Mon, 1 Jul 2019 16:00:29 -0400 Received: by mail-lj1-f196.google.com with SMTP id r9so14496195ljg.5 for ; Mon, 01 Jul 2019 13:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=9UU94f82JSzX3YHKOwlgRBln+7Hg6rn7BOoVRDULvnk=; b=G9H3Ri65HkNRr09Mnj0ZISNCtr87Xy/IcIM+0H0aTQTPQJKj9aBsaOVdPG1CkjtPBM SeED3ckerUd3VYxgvdGzJUdFzI6B8muZqF6V3H1Pl+DVisehhuIo2zshm/YGei+ipWoh 7CVtQP56/LCEzganaDUnI6cFHMAABfqoOgySsCSMfGmdF6wGUNa+rW64uGWiBreUvFzm Elq3YJUvajnVNcCEdi99Dhj8NnbvOihWX1QqWs1U5YMqM1Ztfa+LdU2WU490pWAF3nNB 2dHCW4FDBhuwkpJXby5EVDJN0rFTzaeA6aglX7FCwFvyBvxKhNCLRDJmfobQ/OLPSC3Y KLfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=9UU94f82JSzX3YHKOwlgRBln+7Hg6rn7BOoVRDULvnk=; b=CcLM8/i/HgO1w4w7o1FHYdCvjMrFqSpaw2vVSqQQ9MwndawkGAP5N1xRwN8JPogMIx q3wxr2H6fdns+PCY83+vXfY0FkjfjijdZHZt5ZjnIBohCmR3/+v9OazfkdjT/ftqpYkt awyOIupLarzKxt2NXMgBxYSyhA5AevB24BFduRaOWBdVU2kWjLwMI5PEunJ5CRbBHezb 0VUEnzsTjqlDpp4plVmqOaJ7zdl9weS2bi40fp55/jTcPLQczH2jsfWb3xQ/w/xigV5L GLtKPtg5JJJKpFH/QtiGykp/5+B/k22gjtrIhN1YjMkmGkz0U5X90IdQ26G3jyY/d+rC su7A== X-Gm-Message-State: APjAAAXuhvmx2J1KNBvfktdBLBWb0UcHSEK7rylLbcKUMg3Lwg0RtyGL qkhB1Cv0DlQAXhDP9vLVOGfnyPnhshg= X-Received: by 2002:a2e:9a96:: with SMTP id p22mr14916458lji.57.1562011227367; Mon, 01 Jul 2019 13:00:27 -0700 (PDT) Received: from kynes (apn-77-112-37-101.dynamic.gprs.plus.pl. [77.112.37.101]) by smtp.gmail.com with ESMTPSA id x19sm3389284ljb.6.2019.07.01.13.00.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jul 2019 13:00:26 -0700 (PDT) Date: Mon, 1 Jul 2019 22:00:24 +0200 From: "michal.lowas-rzechonek@silvair.com" To: "Gix, Brian" Cc: "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" Subject: Re: [PATCH BlueZ 2/3] mesh: Add DevKeySend call Message-ID: <20190701200024.btxrfm2ndanzx7tm@kynes> Mail-Followup-To: "Gix, Brian" , "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" References: <20190628125205.21411-1-michal.lowas-rzechonek@silvair.com> <20190628125205.21411-3-michal.lowas-rzechonek@silvair.com> <20190628132932.bhcvcx4tzlfkertu@mlowasrzechonek2133> <1561732393.7802.50.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1561732393.7802.50.camel@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Brian, On 06/28, Gix, Brian wrote: > Unlike App Keys, Device keys do not have a bound Net Key... They can > be sent on *any* network key. So while sending a message on a > specific App index implies the Net Key to use, the Dev Key send does > not, and so needs it to be explicit. After digging through the code, I've noticed that at the moment bluetooth-meshd doesn't really support sending messages using non-primary network key - this is because of internal API limitations (see the TODO next to send_seg function in net.c). Would it be OK for me to start implementing SendDevKey API in a way that always uses the primary subnet, like it's currently done with application keys? The same applies to calling DevKeyMessageReceived() on the application side. I am aware that a node is supposed to respond using the same subnet that a request was sent through, but it's not that simple to implement in one shot... I'd very much like to add subnet support as well, but such a patch would be much, much larger - I think I would need to modify internal APIs to use mesh_subnet struct instead of mesh_net, and do it in many, many places. regards -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND