All of lore.kernel.org
 help / color / mirror / Atom feed
From: Isak Westin <isak.westin@hotmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Isak Westin <isak.westin@hotmail.com>
Subject: [PATCH BlueZ 1/1] mesh: Use correct net_id for received CTL messages
Date: Thu, 30 Jun 2022 09:29:19 +0200	[thread overview]
Message-ID: <VI1PR09MB423902850B3FAEAAC0190EE3E3BA9@VI1PR09MB4239.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <20220630072919.20890-1-isak.westin@hotmail.com>

For received CTL mesh messages, the wrong network ID variable was
passed to ctl_received. This patch changes to the correct variable.

Also, changed type of net_key_id argument in ctl_received function
to be consistent wich the whole call chain.
---
 mesh/net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mesh/net.c b/mesh/net.c
index 8ff3ef32e..e8e6d3a61 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -2028,7 +2028,7 @@ static bool seg_rxed(struct mesh_net *net, bool frnd, uint32_t iv_index,
 	return false;
 }
 
-static bool ctl_received(struct mesh_net *net, uint16_t net_key_id,
+static bool ctl_received(struct mesh_net *net, uint32_t net_key_id,
 						uint32_t iv_index, uint8_t ttl,
 						uint32_t seq,
 						uint16_t src, uint16_t dst,
@@ -2347,7 +2347,7 @@ static enum _relay_advice packet_received(void *user_data,
 							net_seqZero,
 							l_get_be32(msg + 3));
 			} else {
-				ctl_received(net, key_aid, iv_index, net_ttl,
+				ctl_received(net, net_key_id, iv_index, net_ttl,
 						net_seq, net_src, net_dst,
 						net_opcode, rssi, msg,
 								app_msg_len);
-- 
2.20.1


       reply	other threads:[~2022-06-30  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220630072919.20890-1-isak.westin@hotmail.com>
2022-06-30  7:29 ` Isak Westin [this message]
2022-06-30  8:36   ` mesh: Use correct net_id in ctl_received bluez.test.bot
     [not found] <20220415164335.24808-1-isak.westin@hotmail.com>
2022-04-15 16:43 ` [PATCH BlueZ 1/1] mesh: Use correct net_id for received CTL messages Isak Westin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR09MB423902850B3FAEAAC0190EE3E3BA9@VI1PR09MB4239.eurprd09.prod.outlook.com \
    --to=isak.westin@hotmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.