* [PATCH BlueZ] mesh: Fix node composition change detection
@ 2020-07-15 15:33 Brian Gix
2020-07-16 9:42 ` Przemysław Fierek
2020-07-16 17:05 ` Gix, Brian
0 siblings, 2 replies; 3+ messages in thread
From: Brian Gix @ 2020-07-15 15:33 UTC (permalink / raw)
To: linux-bluetooth; +Cc: brian.gix, michal.lowas-rzechonek
This fixes a bug that caused disallowed composition changes from being
detected and rejected. The only fields that are allowed to freely change
are CID, PID, VID and CRPL.
---
mesh/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mesh/node.c b/mesh/node.c
index c61167bda..9b97aa927 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -1579,7 +1579,7 @@ static bool check_req_node(struct managed_obj_request *req)
node = req->node;
node_comp = node_get_comp(node, 0, &node_len);
- len = node_generate_comp(node, comp, sizeof(comp));
+ len = node_generate_comp(req->node, comp, sizeof(comp));
/* If no page 0 exists, save it and return */
if (req->type != REQUEST_TYPE_ATTACH || !node_len || !node_comp)
--
2.25.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] mesh: Fix node composition change detection
2020-07-15 15:33 [PATCH BlueZ] mesh: Fix node composition change detection Brian Gix
@ 2020-07-16 9:42 ` Przemysław Fierek
2020-07-16 17:05 ` Gix, Brian
1 sibling, 0 replies; 3+ messages in thread
From: Przemysław Fierek @ 2020-07-16 9:42 UTC (permalink / raw)
To: Brian Gix, linux-bluetooth; +Cc: michal.lowas-rzechonek
LGTM and solves problem. Please merge it.
/PF
On 15.07.2020 17:33, Brian Gix wrote:
> This fixes a bug that caused disallowed composition changes from being
> detected and rejected. The only fields that are allowed to freely change
> are CID, PID, VID and CRPL.
> ---
> mesh/node.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mesh/node.c b/mesh/node.c
> index c61167bda..9b97aa927 100644
> --- a/mesh/node.c
> +++ b/mesh/node.c
> @@ -1579,7 +1579,7 @@ static bool check_req_node(struct managed_obj_request *req)
> node = req->node;
>
> node_comp = node_get_comp(node, 0, &node_len);
> - len = node_generate_comp(node, comp, sizeof(comp));
> + len = node_generate_comp(req->node, comp, sizeof(comp));
>
> /* If no page 0 exists, save it and return */
> if (req->type != REQUEST_TYPE_ATTACH || !node_len || !node_comp)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] mesh: Fix node composition change detection
2020-07-15 15:33 [PATCH BlueZ] mesh: Fix node composition change detection Brian Gix
2020-07-16 9:42 ` Przemysław Fierek
@ 2020-07-16 17:05 ` Gix, Brian
1 sibling, 0 replies; 3+ messages in thread
From: Gix, Brian @ 2020-07-16 17:05 UTC (permalink / raw)
To: linux-bluetooth; +Cc: michal.lowas-rzechonek
Applied
On Wed, 2020-07-15 at 08:33 -0700, Brian Gix wrote:
> This fixes a bug that caused disallowed composition changes from being
> detected and rejected. The only fields that are allowed to freely change
> are CID, PID, VID and CRPL.
> ---
> mesh/node.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mesh/node.c b/mesh/node.c
> index c61167bda..9b97aa927 100644
> --- a/mesh/node.c
> +++ b/mesh/node.c
> @@ -1579,7 +1579,7 @@ static bool check_req_node(struct managed_obj_request *req)
> node = req->node;
>
> node_comp = node_get_comp(node, 0, &node_len);
> - len = node_generate_comp(node, comp, sizeof(comp));
> + len = node_generate_comp(req->node, comp, sizeof(comp));
>
> /* If no page 0 exists, save it and return */
> if (req->type != REQUEST_TYPE_ATTACH || !node_len || !node_comp)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-16 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15 15:33 [PATCH BlueZ] mesh: Fix node composition change detection Brian Gix
2020-07-16 9:42 ` Przemysław Fierek
2020-07-16 17:05 ` Gix, Brian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).