Skip to content

Commit

Permalink
Merge pull request #866 from pillip8282/fix_wpa2_krack
Browse files Browse the repository at this point in the history
wifi/wpa_suuplicant: patch for wpa_supplicant security issue called KRACK
  • Loading branch information
juitem authored Oct 20, 2017
2 parents 61e72b0 + ddd473d commit 3a42b21
Show file tree
Hide file tree
Showing 27 changed files with 759 additions and 169 deletions.
15 changes: 14 additions & 1 deletion external/wpa_supplicant/src/ap/ap_drv_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ u32 hostapd_sta_flags_to_drv(u32 flags)
if (flags & WLAN_STA_MFP) {
res |= WPA_STA_MFP;
}
if (flags & WLAN_STA_AUTH)
res |= WPA_STA_AUTHENTICATED;
if (flags & WLAN_STA_ASSOC)
res |= WPA_STA_ASSOCIATED;

return res;
}

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

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)
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, int supp_p2p_ps,
int set)
{
struct hostapd_sta_add_params params;

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

Expand Down
7 changes: 6 additions & 1 deletion external/wpa_supplicant/src/ap/ap_drv_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname, int
int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname);
int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname);
int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, const u8 *addr, int aid, int val);
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);
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, int supp_p2p_ps, int set);

int hostapd_set_privacy(struct hostapd_data *hapd, int enabled);
int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem, size_t elem_len);
int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len);
Expand Down
Loading

0 comments on commit 3a42b21

Please sign in to comment.