-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
As defined by Mesh Specification 1.0.1 Section 3.6.6.2 Friendship security.
The Low Power node then decides to send two messages: OutMsg1 and OutMsg2. OutMsg1 is sentsecured using the friend security credentials and therefore only the Friend node will receive and relay thismessage. When the Friend node relays OutMsg1, the message will be retransmitted using the mastersecurity credentials. OutMsg2 is sent secured using the master security credentials and therefore theFriend node and any other Relay node within range of the Low Power node can relay the message.OutMsg2, when it is relayed, will be retransmitted using the master security credentials.
If low power node publish with unicast address other than friend address, the friend node not relayed this message, no matter friend cred used.
zephyr/subsys/bluetooth/mesh/net.c
Lines 797 to 805 in ba9fd65
| /* Relay if this was a group/virtual address, or if the destination | |
| * was neither a local element nor an LPN we're Friends for. | |
| */ | |
| if (!BT_MESH_ADDR_IS_UNICAST(rx.ctx.recv_dst) || | |
| (!rx.local_match && !rx.friend_match)) { | |
| net_buf_simple_restore(&buf, &state); | |
| bt_mesh_net_relay(&buf, &rx); | |
| } | |
| } |
Another problem in bt_mesh_net_relay
zephyr/subsys/bluetooth/mesh/net.c
Lines 614 to 618 in ba9fd65
| if (rx->net_if == BT_MESH_NET_IF_ADV && | |
| bt_mesh_relay_get() != BT_MESH_RELAY_ENABLED && | |
| bt_mesh_gatt_proxy_get() != BT_MESH_GATT_PROXY_ENABLED) { | |
| return; | |
| } |
This implementation obviously prohibit relay message for low power node, even local is friend node.