Skip to content

Commit

Permalink
Merge branch 'feature/add_filter_seq_auth_config_v4.3' into 'release/…
Browse files Browse the repository at this point in the history
…v4.3'

ble_mesh: stack: Add filter old seq_auth packet menuconfig(v4.3)

See merge request espressif/esp-idf!18650
  • Loading branch information
Isl2017 committed Jun 24, 2022
2 parents b3f523b + dd72d30 commit 7988aec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions components/bt/esp_ble_mesh/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,13 @@ if BLE_MESH
lets the state to be changed at any time.
If IV Update test mode is going to be used, this option should be enabled.

config BLE_MESH_DISCARD_OLD_SEQ_AUTH
bool
default y
help
This option is used to decide whether discarding the old SeqAuth when
receiving a segmented message.

menu "BLE Mesh specific test option"

config BLE_MESH_SELF_TEST
Expand Down
11 changes: 6 additions & 5 deletions components/bt/esp_ble_mesh/mesh_core/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,13 +1396,14 @@ static struct seg_rx *seg_rx_find(struct bt_mesh_net_rx *net_rx,
continue;
}

/* Return newer RX context in addition to an exact match, so
* the calling function can properly discard an old SeqAuth.
* Note: in Zephyr v1.14.0, ">=" is used here which does not
* seem to be a right operation, hence we still use the original
* "==" here.
/* When ">=" is used, return newer RX context in addition to an exact match,
* so the calling function can properly discard an old SeqAuth.
*/
#if CONFIG_BLE_MESH_DISCARD_OLD_SEQ_AUTH
if (rx->seq_auth >= *seq_auth) {
#else
if (rx->seq_auth == *seq_auth) {
#endif
return rx;
}

Expand Down

0 comments on commit 7988aec

Please sign in to comment.