Bluetooth: Add validity checks for adv & scan parameters
Change-Id: I46900e740794f96b91d01bfb6dc3f808881224cf Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
784e391bef
commit
40cb272e14
2 changed files with 35 additions and 0 deletions
|
@ -831,6 +831,11 @@ struct bt_conn *bt_conn_create_le(const bt_addr_le_t *peer,
|
|||
{
|
||||
struct bt_conn *conn;
|
||||
|
||||
if (!bt_le_conn_params_valid(param->interval_min, param->interval_max,
|
||||
param->latency, param->timeout)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (atomic_test_bit(bt_dev.flags, BT_DEV_EXPLICIT_SCAN)) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue