Skip to content

Commit 9dfcaf1

Browse files
LingaoMjukkar
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: Fix proxy advertising set sending Mesh messages
When start to sending proxy advertising, will also process in send_pending_adv, but the bt_mesh_adv_get_by_tag will directly return buffer from bt_mesh_adv_queue or bt_mesh_relay_queue, which case mesh messages sent on different sets, can cause peer replay attack. Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit b54f49c) Signed-off-by: Håvard Reierstad <[email protected]> (cherry picked from commit 962f615)
1 parent b979e73 commit 9dfcaf1

File tree

1 file changed

+5
-0
lines changed
  • subsys/bluetooth/mesh

1 file changed

+5
-0
lines changed

subsys/bluetooth/mesh/adv.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ struct bt_mesh_adv *bt_mesh_adv_get_by_tag(enum bt_mesh_adv_tag_bit tags, k_time
233233
return k_fifo_get(&bt_mesh_relay_queue, timeout);
234234
}
235235

236+
if (IS_ENABLED(CONFIG_BT_MESH_ADV_EXT_GATT_SEPARATE) &&
237+
tags & BT_MESH_ADV_TAG_BIT_PROXY) {
238+
return NULL;
239+
}
240+
236241
return bt_mesh_adv_get(timeout);
237242
}
238243

0 commit comments

Comments
 (0)