Skip to content

Commit 3a42b21

Browse files
authored
Merge pull request #866 from pillip8282/fix_wpa2_krack
wifi/wpa_suuplicant: patch for wpa_supplicant security issue called KRACK
2 parents 61e72b0 + ddd473d commit 3a42b21

27 files changed

+759
-169
lines changed

external/wpa_supplicant/src/ap/ap_drv_ops.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ u32 hostapd_sta_flags_to_drv(u32 flags)
3636
if (flags & WLAN_STA_MFP) {
3737
res |= WPA_STA_MFP;
3838
}
39+
if (flags & WLAN_STA_AUTH)
40+
res |= WPA_STA_AUTHENTICATED;
41+
if (flags & WLAN_STA_ASSOC)
42+
res |= WPA_STA_ASSOCIATED;
43+
3944
return res;
4045
}
4146

@@ -351,7 +356,13 @@ int hostapd_sta_assoc(struct hostapd_data *hapd, const u8 *addr, int reassoc, u1
351356
return hapd->driver->sta_assoc(hapd->drv_priv, hapd->own_addr, addr, reassoc, status, ie, len);
352357
}
353358

354-
int hostapd_sta_add(struct hostapd_data *hapd, const u8 *addr, u16 aid, u16 capability, const u8 *supp_rates, size_t supp_rates_len, u16 listen_interval, const struct ieee80211_ht_capabilities *ht_capab, const struct ieee80211_vht_capabilities *vht_capab, u32 flags, u8 qosinfo, u8 vht_opmode)
359+
int hostapd_sta_add(struct hostapd_data *hapd, const u8 *addr, u16 aid,
360+
u16 capability, const u8 *supp_rates,
361+
size_t supp_rates_len, u16 listen_interval,
362+
const struct ieee80211_ht_capabilities *ht_capab,
363+
const struct ieee80211_vht_capabilities *vht_capab,
364+
u32 flags, u8 qosinfo, u8 vht_opmode, int supp_p2p_ps,
365+
int set)
355366
{
356367
struct hostapd_sta_add_params params;
357368

@@ -375,6 +386,8 @@ int hostapd_sta_add(struct hostapd_data *hapd, const u8 *addr, u16 aid, u16 capa
375386
params.vht_opmode = vht_opmode;
376387
params.flags = hostapd_sta_flags_to_drv(flags);
377388
params.qosinfo = qosinfo;
389+
params.support_p2p_ps = supp_p2p_ps;
390+
params.set = set;
378391
return hapd->driver->sta_add(hapd->drv_priv, &params);
379392
}
380393

external/wpa_supplicant/src/ap/ap_drv_ops.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname, int
2727
int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname);
2828
int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname);
2929
int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, const u8 *addr, int aid, int val);
30-
int hostapd_sta_add(struct hostapd_data *hapd, const u8 *addr, u16 aid, u16 capability, const u8 *supp_rates, size_t supp_rates_len, u16 listen_interval, const struct ieee80211_ht_capabilities *ht_capab, const struct ieee80211_vht_capabilities *vht_capab, u32 flags, u8 qosinfo, u8 vht_opmode);
30+
int hostapd_sta_add(struct hostapd_data *hapd, const u8 *addr, u16 aid,
31+
u16 capability, const u8 *supp_rates, size_t supp_rates_len,
32+
u16 listen_interval, const struct ieee80211_ht_capabilities *ht_capab,
33+
const struct ieee80211_vht_capabilities *vht_capab,
34+
u32 flags, u8 qosinfo, u8 vht_opmode, int supp_p2p_ps, int set);
35+
3136
int hostapd_set_privacy(struct hostapd_data *hapd, int enabled);
3237
int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem, size_t elem_len);
3338
int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len);

0 commit comments

Comments
 (0)