diff options
| author | Inga Stotland <inga.stotland@intel.com> | 2022-10-21 17:48:56 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-31 13:26:14 +0100 |
| commit | b98b2c0c922bd98bc287ab81bff8e9eabd72f648 (patch) | |
| tree | 754588979bc21dc66e2e5f752739f2e256be50f0 /net | |
| parent | ead0edfc426ab54863e5798cdf7bd17ca42c7d84 (diff) | |
| download | linux-b98b2c0c922bd98bc287ab81bff8e9eabd72f648.tar.gz linux-b98b2c0c922bd98bc287ab81bff8e9eabd72f648.tar.bz2 linux-b98b2c0c922bd98bc287ab81bff8e9eabd72f648.zip | |
Bluetooth: MGMT: Fix error report for ADD_EXT_ADV_PARAMS
[ Upstream commit 3b1c7c00b8c22b3cb79532252c59eb0b287bb86d ]
When validating the parameter length for MGMT_OP_ADD_EXT_ADV_PARAMS
command, use the correct op code in error status report:
was MGMT_OP_ADD_ADVERTISING, changed to MGMT_OP_ADD_EXT_ADV_PARAMS.
Fixes: 12410572833a2 ("Bluetooth: Break add adv into two mgmt commands")
Signed-off-by: Inga Stotland <inga.stotland@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/bluetooth/mgmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3d1cd0666968..22bfeb5b2b3b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -8385,7 +8385,7 @@ static int add_ext_adv_params(struct sock *sk, struct hci_dev *hdev, * extra parameters we don't know about will be ignored in this request. */ if (data_len < MGMT_ADD_EXT_ADV_PARAMS_MIN_SIZE) - return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING, + return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS, MGMT_STATUS_INVALID_PARAMS); flags = __le32_to_cpu(cp->flags); |
