From 009cfb5188f8287819cb73ae4910dc55b659e41c Mon Sep 17 00:00:00 2001 From: Christian Eggers Date: Fri, 11 Jul 2025 23:57:13 +0200 Subject: [PATCH] mesh: net-keys: more uses of BEACON_LEN_SNB and BEACON_LEN_MPB --- mesh/net-keys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh/net-keys.c b/mesh/net-keys.c index a10f93ccb..22ab5b626 100644 --- a/mesh/net-keys.c +++ b/mesh/net-keys.c @@ -442,10 +442,10 @@ static bool match_beacon(const void *a, const void *b) const uint8_t *incoming = b; if (incoming[0] == BEACON_TYPE_MPB) - return !memcmp(cached->data, incoming, 27); + return !memcmp(cached->data, incoming, BEACON_LEN_MPB - 1); if (incoming[0] == BEACON_TYPE_SNB) - return !memcmp(cached->data, incoming, 22); + return !memcmp(cached->data, incoming, BEACON_LEN_SNB - 1); return false; } -- 2.47.3