mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
driver: Add a packet filtering function declaration
Add a new function declaration that will allow wpa_supplicant to request the driver to configure data frame filters for specific cases. Add definitions that will allow frame filtering for stations as required by Hotspot 2.0: 1. Gratuitous ARP 2. Unsolicited NA 3. Unicast IP packets encrypted with GTK Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
This commit is contained in:
parent
ae33239c55
commit
e42adb9a75
@ -54,6 +54,13 @@
|
||||
#define HOSTAPD_CHAN_VHT_130_30 0x04000000
|
||||
#define HOSTAPD_CHAN_VHT_150_10 0x08000000
|
||||
|
||||
/* Filter gratuitous ARP */
|
||||
#define WPA_DATA_FRAME_FILTER_FLAG_ARP BIT(0)
|
||||
/* Filter unsolicited Neighbor Advertisement */
|
||||
#define WPA_DATA_FRAME_FILTER_FLAG_NA BIT(1)
|
||||
/* Filter unicast IP packets encrypted using the GTK */
|
||||
#define WPA_DATA_FRAME_FILTER_FLAG_GTK BIT(2)
|
||||
|
||||
/**
|
||||
* enum reg_change_initiator - Regulatory change initiator
|
||||
*/
|
||||
@ -3538,6 +3545,15 @@ struct wpa_driver_ops {
|
||||
* Returns 0 on success, -1 on failure
|
||||
*/
|
||||
int (*abort_scan)(void *priv);
|
||||
|
||||
/**
|
||||
* configure_data_frame_filters - Request to configure frame filters
|
||||
* @priv: Private driver interface data
|
||||
* @filter_flags: The type of frames to filter (bitfield of
|
||||
* WPA_DATA_FRAME_FILTER_FLAG_*)
|
||||
* Returns: 0 on success or -1 on failure
|
||||
*/
|
||||
int (*configure_data_frame_filters)(void *priv, u32 filter_flags);
|
||||
};
|
||||
|
||||
|
||||
|
@ -917,4 +917,13 @@ static inline int wpa_drv_abort_scan(struct wpa_supplicant *wpa_s)
|
||||
return wpa_s->driver->abort_scan(wpa_s->drv_priv);
|
||||
}
|
||||
|
||||
static inline int wpa_drv_configure_frame_filters(struct wpa_supplicant *wpa_s,
|
||||
u32 filters)
|
||||
{
|
||||
if (!wpa_s->driver->configure_data_frame_filters)
|
||||
return -1;
|
||||
return wpa_s->driver->configure_data_frame_filters(wpa_s->drv_priv,
|
||||
filters);
|
||||
}
|
||||
|
||||
#endif /* DRIVER_I_H */
|
||||
|
Loading…
Reference in New Issue
Block a user