mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/add_filter_seq_auth_config_v4.4' into 'release/v4.4'
ble_mesh: stack: Add filter old seq_auth packet menuconfig(v4.4) See merge request espressif/esp-idf!18649
This commit is contained in:
commit
46cff3cd1c
@ -1094,6 +1094,13 @@ if BLE_MESH
|
|||||||
lets the state to be changed at any time.
|
lets the state to be changed at any time.
|
||||||
If IV Update test mode is going to be used, this option should be enabled.
|
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"
|
menu "BLE Mesh specific test option"
|
||||||
|
|
||||||
config BLE_MESH_SELF_TEST
|
config BLE_MESH_SELF_TEST
|
||||||
|
@ -1396,13 +1396,14 @@ static struct seg_rx *seg_rx_find(struct bt_mesh_net_rx *net_rx,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return newer RX context in addition to an exact match, so
|
/* When ">=" is used, return newer RX context in addition to an exact match,
|
||||||
* the calling function can properly discard an old SeqAuth.
|
* 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.
|
|
||||||
*/
|
*/
|
||||||
|
#if CONFIG_BLE_MESH_DISCARD_OLD_SEQ_AUTH
|
||||||
|
if (rx->seq_auth >= *seq_auth) {
|
||||||
|
#else
|
||||||
if (rx->seq_auth == *seq_auth) {
|
if (rx->seq_auth == *seq_auth) {
|
||||||
|
#endif
|
||||||
return rx;
|
return rx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user