This uses skb_pull_data to check the Inquiry Result with RSSI events received have the minimum required length.
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -2194,7 +2194,7 @@ struct hci_ev_pscan_rep_mode { · 2193 unmodified lines | |||
| 2194 | } __packed; | 2194 | } __packed; |
| 2195 | 2195 | ||
| 2196 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 | 2196 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 |
| 2197 | struct inquiry_info_with_rssi { | 2197 | struct inquiry_info_rssi { |
| 2198 | bdaddr_t bdaddr; | 2198 | bdaddr_t bdaddr; |
| 2199 | __u8 pscan_rep_mode; | 2199 | __u8 pscan_rep_mode; |
| 2200 | __u8 pscan_period_mode; | 2200 | __u8 pscan_period_mode; |
| @@ -2202,7 +2202,7 @@ struct inquiry_info_with_rssi { · 1 unmodified line | |||
| 2202 | __le16 clock_offset; | 2202 | __le16 clock_offset; |
| 2203 | __s8 rssi; | 2203 | __s8 rssi; |
| 2204 | } __packed; | 2204 | } __packed; |
| 2205 | struct inquiry_info_with_rssi_and_pscan_mode { | 2205 | struct inquiry_info_rssi_pscan { |
| 2206 | bdaddr_t bdaddr; | 2206 | bdaddr_t bdaddr; |
| 2207 | __u8 pscan_rep_mode; | 2207 | __u8 pscan_rep_mode; |
| 2208 | __u8 pscan_period_mode; | 2208 | __u8 pscan_period_mode; |
| @@ -2211,6 +2211,14 @@ struct inquiry_info_with_rssi_and_pscan_mode { · 2 unmodified lines | |||
| 2211 | __le16 clock_offset; | 2211 | __le16 clock_offset; |
| 2212 | __s8 rssi; | 2212 | __s8 rssi; |
| 2213 | } __packed; | 2213 | } __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; | ||
| 2214 | 2222 | ||
| 2215 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 | 2223 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 |
| 2216 | struct hci_ev_remote_ext_features { | 2224 | struct hci_ev_remote_ext_features { |