Skip to content

Commit d86d37a

Browse files
kipm-otjhedberg
authored andcommitted
Bluetooth: Host: Adding valid param check in send_conn_le_param_update()
Send connection parameter update request only if it contains the valid range of values for connection intervals, latency and timeout. Signed-off-by: Kiran Paramaswaran <[email protected]>
1 parent b9b474c commit d86d37a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ static int send_conn_le_param_update(struct bt_conn *conn,
214214
conn->le.features[0], param->interval_min,
215215
param->interval_max, param->latency, param->timeout);
216216

217+
/* Proceed only if connection parameters contains valid values*/
218+
if (!bt_le_conn_params_valid(param)) {
219+
return -EINVAL;
220+
}
221+
217222
/* Use LE connection parameter request if both local and remote support
218223
* it; or if local role is master then use LE connection update.
219224
*/

0 commit comments

Comments
 (0)