Skip to content

Commit 009d335

Browse files
alxelaxcvinayak
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: fix proxy solicitation
Commit makes workable proxy solicitation functionality only server part without dependencies on client part. Only on demand proxy server is required. Signed-off-by: Aleksandr Khromykh <[email protected]> (cherry picked from commit 625faa7) Signed-off-by: Alperen Şener <[email protected]>
1 parent 0d0fabd commit 009d335

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

include/zephyr/bluetooth/uuid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ struct bt_uuid_128 {
587587
/**
588588
* @brief Proxy Solicitation UUID value
589589
*/
590-
#define BT_UUID_MESH_PROXY_SOLICITATION_VAL 0x7fcb
590+
#define BT_UUID_MESH_PROXY_SOLICITATION_VAL 0x1859
591591
/**
592592
* @brief Reconnection Configuration Service UUID value
593593
*/

subsys/bluetooth/mesh/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ int bt_mesh_net_decrypt(const struct bt_mesh_key *key, struct net_buf_simple *bu
419419

420420
if (IS_ENABLED(CONFIG_BT_MESH_PROXY) && type == BT_MESH_NONCE_PROXY) {
421421
create_proxy_nonce(nonce, buf->data, iv_index);
422-
} else if (IS_ENABLED(CONFIG_BT_MESH_PROXY_SOLICITATION) &&
422+
} else if (IS_ENABLED(CONFIG_BT_MESH_SOLICITATION) &&
423423
type == BT_MESH_NONCE_SOLICITATION) {
424424
create_proxy_sol_nonce(nonce, buf->data);
425425
} else {

subsys/bluetooth/mesh/proxy_srv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,11 @@ static void gatt_proxy_solicited(struct bt_mesh_subnet *sub)
698698

699699
if (sub->priv_net_id_sent > 0) {
700700
timeout = sub->priv_net_id_sent + MSEC_PER_SEC * bt_mesh_od_priv_proxy_get();
701+
remaining = MIN(timeout - now, INT32_MAX);
702+
} else {
703+
remaining = MSEC_PER_SEC * bt_mesh_od_priv_proxy_get();
701704
}
702705

703-
remaining = MIN(timeout - now, INT32_MAX);
704706
if ((timeout > 0 && now > timeout) || (remaining / MSEC_PER_SEC < 1)) {
705707
LOG_DBG("Advertising Private Network ID timed out "
706708
"after solicitation");

0 commit comments

Comments
 (0)