mesh: Ignore Friend Request from local interface
Friend Request is also transmitted over local queue and if both Friend and LPN features are enabled then we would try to establish friendship with ourselves. Fixes MESH/NODE/FRND/LPN testcases. Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
This commit is contained in:
parent
1e29b2dceb
commit
91761767dd
1 changed files with 5 additions and 0 deletions
|
@ -905,6 +905,11 @@ int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct net_buf_simple *buf)
|
|||
uint32_t poll_to;
|
||||
int i;
|
||||
|
||||
if (rx->net_if == BT_MESH_NET_IF_LOCAL) {
|
||||
BT_DBG("Ignoring Friend request from local interface");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (buf->len < sizeof(*msg)) {
|
||||
BT_WARN("Too short Friend Request");
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue