From 131a4e7c222b36a9899fce43cbbb921d44fbf739 Mon Sep 17 00:00:00 2001 From: lly Date: Mon, 2 Dec 2019 17:42:40 +0800 Subject: [PATCH] ble_mesh: fix provisioner failed to send msg to 0xFFFF According to Mesh Spec 3.4.5.3, a node shall implement a local network interface. And here we limit the situation just based on the spec, and Provisioner directly sending the msg without passing through the local network interface. --- components/bt/esp_ble_mesh/mesh_core/net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/bt/esp_ble_mesh/mesh_core/net.c b/components/bt/esp_ble_mesh/mesh_core/net.c index 0592031a7f..55ba8afb1a 100644 --- a/components/bt/esp_ble_mesh/mesh_core/net.c +++ b/components/bt/esp_ble_mesh/mesh_core/net.c @@ -935,8 +935,9 @@ int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct net_buf *buf, #endif /* Deliver to local network interface if necessary */ - if (bt_mesh_fixed_group_match(tx->ctx->addr) || - bt_mesh_elem_find(tx->ctx->addr)) { + if (IS_ENABLED(CONFIG_BLE_MESH_NODE) && bt_mesh_is_provisioned() && + (bt_mesh_fixed_group_match(tx->ctx->addr) || + bt_mesh_elem_find(tx->ctx->addr))) { if (cb && cb->start) { cb->start(0, 0, cb_data); }