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 | 2194 | } __packed; |
| 2195 | 2195 | |
| 2196 | 2196 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 |
| 2197 | −struct inquiry_info_with_rssi { | |
| 2197 | +struct inquiry_info_rssi { | |
| 2198 | 2198 | bdaddr_t bdaddr; |
| 2199 | 2199 | __u8 pscan_rep_mode; |
| 2200 | 2200 | __u8 pscan_period_mode; |
| @@ -2202,7 +2202,7 @@ struct inquiry_info_with_rssi { · 1 unmodified line | ||
| 2202 | 2202 | __le16 clock_offset; |
| 2203 | 2203 | __s8 rssi; |
| 2204 | 2204 | } __packed; |
| 2205 | −struct inquiry_info_with_rssi_and_pscan_mode { | |
| 2205 | +struct inquiry_info_rssi_pscan { | |
| 2206 | 2206 | bdaddr_t bdaddr; |
| 2207 | 2207 | __u8 pscan_rep_mode; |
| 2208 | 2208 | __u8 pscan_period_mode; |
| @@ -2211,6 +2211,14 @@ struct inquiry_info_with_rssi_and_pscan_mode { · 2 unmodified lines | ||
| 2211 | 2211 | __le16 clock_offset; |
| 2212 | 2212 | __s8 rssi; |
| 2213 | 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 | 2223 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 |
| 2216 | 2224 | struct hci_ev_remote_ext_features { |