Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH BlueZ] mesh: Allow apps to receive DevKey messages from external nodes
@ 2020-01-09 10:32 Michał Lowas-Rzechonek
  2020-01-14 14:39 ` Gix, Brian
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Lowas-Rzechonek @ 2020-01-09 10:32 UTC (permalink / raw)
  To: linux-bluetooth

After introducing "remote" flag for DevKeyMessageReceived in
c8cd5b04ccd865deeb90b70ea649c0b6cc0385e6, we can now allow applications
to received DevKey messages from external addresses as well as from
local ones.

This enables applications to properly implement models using DevKey
security, by accepting only requests with "remote" flag set to false.
---
 mesh/model.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mesh/model.c b/mesh/model.c
index acdd94f7b..6d7674ee5 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -1066,8 +1066,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
 						forward.app_idx, forward.size,
 						forward.data);
 			else if (decrypt_idx == APP_IDX_DEV_REMOTE ||
-				(decrypt_idx == APP_IDX_DEV_LOCAL &&
-				 mesh_net_is_local_address(net, src, 1)))
+				 decrypt_idx == APP_IDX_DEV_LOCAL)
 				send_dev_key_msg_rcvd(node, i, src, decrypt_idx,
 						0, forward.size, forward.data);
 		}
-- 
2.19.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH BlueZ] mesh: Allow apps to receive DevKey messages from external nodes
  2020-01-09 10:32 [PATCH BlueZ] mesh: Allow apps to receive DevKey messages from external nodes Michał Lowas-Rzechonek
@ 2020-01-14 14:39 ` Gix, Brian
  0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2020-01-14 14:39 UTC (permalink / raw)
  To: michal.lowas-rzechonek, linux-bluetooth

Applied
On Thu, 2020-01-09 at 11:32 +0100, Michał Lowas-Rzechonek wrote:
> After introducing "remote" flag for DevKeyMessageReceived in
> c8cd5b04ccd865deeb90b70ea649c0b6cc0385e6, we can now allow applications
> to received DevKey messages from external addresses as well as from
> local ones.
> 
> This enables applications to properly implement models using DevKey
> security, by accepting only requests with "remote" flag set to false.
> ---
>  mesh/model.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mesh/model.c b/mesh/model.c
> index acdd94f7b..6d7674ee5 100644
> --- a/mesh/model.c
> +++ b/mesh/model.c
> @@ -1066,8 +1066,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,
>  						forward.app_idx, forward.size,
>  						forward.data);
>  			else if (decrypt_idx == APP_IDX_DEV_REMOTE ||
> -				(decrypt_idx == APP_IDX_DEV_LOCAL &&
> -				 mesh_net_is_local_address(net, src, 1)))
> +				 decrypt_idx == APP_IDX_DEV_LOCAL)
>  				send_dev_key_msg_rcvd(node, i, src, decrypt_idx,
>  						0, forward.size, forward.data);
>  		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 10:32 [PATCH BlueZ] mesh: Allow apps to receive DevKey messages from external nodes Michał Lowas-Rzechonek
2020-01-14 14:39 ` Gix, Brian

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git