History

Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result with RSSI event

This uses skb_pull_data to check the Inquiry Result with RSSI events received have the minimum required length.

Luiz Augusto von Dentz committed 4 years ago

Commit 8d08d321 parent 27d9eb42 files · +33 −19Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/net/bluetooth/hci.h+10−2
@@ -2194,7 +2194,7 @@ struct hci_ev_pscan_rep_mode { · 2193 unmodified lines
21942194 } __packed;
21952195
21962196 #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22
2197−struct inquiry_info_with_rssi {
2197+struct inquiry_info_rssi {
21982198 bdaddr_t bdaddr;
21992199 __u8 pscan_rep_mode;
22002200 __u8 pscan_period_mode;
@@ -2202,7 +2202,7 @@ struct inquiry_info_with_rssi { · 1 unmodified line
22022202 __le16 clock_offset;
22032203 __s8 rssi;
22042204 } __packed;
2205−struct inquiry_info_with_rssi_and_pscan_mode {
2205+struct inquiry_info_rssi_pscan {
22062206 bdaddr_t bdaddr;
22072207 __u8 pscan_rep_mode;
22082208 __u8 pscan_period_mode;
@@ -2211,6 +2211,14 @@ struct inquiry_info_with_rssi_and_pscan_mode { · 2 unmodified lines
22112211 __le16 clock_offset;
22122212 __s8 rssi;
22132213 } __packed;
2214+struct hci_ev_inquiry_result_rssi {
2215+ __u8 num;
2216+ struct inquiry_info_rssi info[];
2217+} __packed;
2218+struct hci_ev_inquiry_result_rssi_pscan {
2219+ __u8 num;
2220+ struct inquiry_info_rssi_pscan info[];
2221+} __packed;
22142222
22152223 #define HCI_EV_REMOTE_EXT_FEATURES 0x23
22162224 struct hci_ev_remote_ext_features {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t