diff --git a/components/bt/controller/esp32/Kconfig.in b/components/bt/controller/esp32/Kconfig.in index ab80cb0a73..a5bbe5be1f 100644 --- a/components/bt/controller/esp32/Kconfig.in +++ b/components/bt/controller/esp32/Kconfig.in @@ -421,6 +421,7 @@ config BTDM_CTRL_SCAN_BACKOFF_UPPERLIMITMAX config BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS bool "Enable enhanced Access Address check in CONNECT_IND" + depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM) default n help Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU. diff --git a/components/bt/controller/esp32/bt.c b/components/bt/controller/esp32/bt.c index f2bc48fac9..ac3108fb44 100644 --- a/components/bt/controller/esp32/bt.c +++ b/components/bt/controller/esp32/bt.c @@ -248,6 +248,7 @@ extern uint32_t _bt_controller_data_end; extern void config_bt_funcs_reset(void); extern void config_ble_funcs_reset(void); extern void config_btdm_funcs_reset(void); +extern void btdm_aa_check_enhance_enable(void); #ifdef CONFIG_BT_BLUEDROID_ENABLED extern void bt_stack_enableSecCtrlVsCmd(bool en); @@ -1850,6 +1851,10 @@ static void patch_apply(void) #ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY config_ble_funcs_reset(); #endif + +#if BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED + btdm_aa_check_enhance_enable(); +#endif } esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)