X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=package%2Fhostapd%2Fpatches%2F100-pending_work.patch;h=1c97a64caaf6a76feab61e58419093c735eab41f;hb=eecf5b17520f6b3b6ffb45ac7dca298d93b27501;hp=8b318190fd511e26098f07e3a4519a5bc5f41f0d;hpb=7824784240f8b1f5906b3b95cfe12b1825e04523;p=openwrt.git diff --git a/package/hostapd/patches/100-pending_work.patch b/package/hostapd/patches/100-pending_work.patch index 8b318190fd..1c97a64caa 100644 --- a/package/hostapd/patches/100-pending_work.patch +++ b/package/hostapd/patches/100-pending_work.patch @@ -1,6 +1,6 @@ --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -1471,13 +1471,6 @@ static void handle_assoc_cb(struct hosta +@@ -1506,13 +1506,6 @@ static void handle_assoc_cb(struct hosta int new_assoc = 1; struct ieee80211_ht_capabilities ht_cap; @@ -14,7 +14,7 @@ if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) : sizeof(mgmt->u.assoc_resp))) { printf("handle_assoc_cb(reassoc=%d) - too short payload " -@@ -1485,11 +1478,6 @@ static void handle_assoc_cb(struct hosta +@@ -1520,11 +1513,6 @@ static void handle_assoc_cb(struct hosta return; } @@ -26,7 +26,7 @@ sta = ap_get_sta(hapd, mgmt->da); if (!sta) { printf("handle_assoc_cb: STA " MACSTR " not found\n", -@@ -1497,6 +1485,19 @@ static void handle_assoc_cb(struct hosta +@@ -1532,6 +1520,19 @@ static void handle_assoc_cb(struct hosta return; } @@ -46,34 +46,33 @@ if (status != WLAN_STATUS_SUCCESS) goto fail; +@@ -1830,6 +1831,9 @@ void ieee802_11_rx_from_unknown(struct h + + sta = ap_get_sta(hapd, src); + if (sta && (sta->flags & WLAN_STA_ASSOC)) { ++ if (!hapd->conf->wds_sta) ++ return; ++ + if (wds && !(sta->flags & WLAN_STA_WDS)) { + wpa_printf(MSG_DEBUG, "Enable 4-address WDS mode for " + "STA " MACSTR " (aid %u)", --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -181,6 +181,7 @@ struct i802_bss { - struct wpa_driver_nl80211_data *drv; - struct i802_bss *next; - int ifindex; -+ u8 addr[ETH_ALEN]; - char ifname[IFNAMSIZ + 1]; - char brname[IFNAMSIZ]; - unsigned int beacon_set:1; -@@ -191,7 +192,6 @@ struct i802_bss { - struct wpa_driver_nl80211_data { - struct nl80211_global *global; - struct dl_list list; -- u8 addr[ETH_ALEN]; - char phyname[32]; - void *ctx; - int ifindex; -@@ -2482,7 +2482,7 @@ wpa_driver_nl80211_finish_drv_init(struc - return -1; +@@ -2661,10 +2661,10 @@ static int wpa_driver_nl80211_capa(struc + drv->data_tx_status = info.data_tx_status; - if (linux_get_ifhwaddr(drv->global->ioctl_sock, bss->ifname, -- drv->addr)) -+ bss->addr)) - return -1; + /* +- * If poll command is supported mac80211 is new enough to +- * have everything we need to not need monitor interfaces. ++ * If poll command and tx status are supported, mac80211 is new enough ++ * to have everything we need to not need monitor interfaces. + */ +- drv->use_monitor = !info.poll_command_supported; ++ drv->use_monitor = !info.poll_command_supported || !info.data_tx_status; - if (nl80211_register_action_frames(drv) < 0) { -@@ -5176,8 +5176,8 @@ static int wpa_driver_nl80211_hapd_send_ + if (drv->device_ap_sme && drv->use_monitor) { + /* +@@ -6392,8 +6392,8 @@ static int wpa_driver_nl80211_hapd_send_ pos = (u8 *) (hdr + 1); if (qos) { @@ -84,17 +83,8 @@ pos[1] = 0; pos += 2; } -@@ -6407,7 +6407,7 @@ static int i802_set_wds_sta(void *priv, - if (!if_nametoindex(name)) { - if (nl80211_create_iface(drv, name, - NL80211_IFTYPE_AP_VLAN, -- NULL, 1) < 0) -+ bss->addr, 1) < 0) - return -1; - if (bridge_ifname && - linux_br_add_if(drv->global->ioctl_sock, -@@ -6417,6 +6417,10 @@ static int i802_set_wds_sta(void *priv, - linux_set_iface_flags(drv->global->ioctl_sock, name, 1); +@@ -7698,6 +7698,10 @@ static int i802_set_wds_sta(void *priv, + } return i802_set_sta_vlan(priv, addr, name, 0); } else { + if (bridge_ifname) @@ -104,36 +94,7 @@ i802_set_sta_vlan(priv, addr, bss->ifname, 0); return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN, name); -@@ -6625,7 +6629,7 @@ static int nl80211_addr_in_use(struct nl - struct wpa_driver_nl80211_data *drv; - dl_list_for_each(drv, &global->interfaces, - struct wpa_driver_nl80211_data, list) { -- if (os_memcmp(addr, drv->addr, ETH_ALEN) == 0) -+ if (os_memcmp(addr, drv->first_bss.addr, ETH_ALEN) == 0) - return 1; - } - return 0; -@@ -6640,9 +6644,9 @@ static int nl80211_p2p_interface_addr(st - if (!drv->global) - return -1; - -- os_memcpy(new_addr, drv->addr, ETH_ALEN); -+ os_memcpy(new_addr, drv->first_bss.addr, ETH_ALEN); - for (idx = 0; idx < 64; idx++) { -- new_addr[0] = drv->addr[0] | 0x02; -+ new_addr[0] = drv->first_bss.addr[0] | 0x02; - new_addr[0] ^= idx << 2; - if (!nl80211_addr_in_use(drv->global, new_addr)) - break; -@@ -6745,6 +6749,7 @@ static int wpa_driver_nl80211_if_add(voi - os_free(new_bss); - return -1; - } -+ memcpy(new_bss->addr, addr ? addr : if_addr, ETH_ALEN); - os_strlcpy(new_bss->ifname, ifname, IFNAMSIZ); - new_bss->ifindex = ifidx; - new_bss->drv = drv; -@@ -6775,7 +6780,12 @@ static int wpa_driver_nl80211_if_remove( +@@ -8065,7 +8069,12 @@ static int wpa_driver_nl80211_if_remove( if (ifindex <= 0) return -1; @@ -146,7 +107,7 @@ if (bss->added_if_into_bridge) { if (linux_br_del_if(drv->global->ioctl_sock, bss->brname, bss->ifname) < 0) -@@ -6789,13 +6799,6 @@ static int wpa_driver_nl80211_if_remove( +@@ -8079,13 +8088,6 @@ static int wpa_driver_nl80211_if_remove( "bridge %s: %s", bss->brname, strerror(errno)); } @@ -160,21 +121,3 @@ if (bss != &drv->first_bss) { struct i802_bss *tbss; ---- a/src/ap/wpa_auth.c -+++ b/src/ap/wpa_auth.c -@@ -776,7 +776,14 @@ void wpa_receive(struct wpa_authenticato - } - - if (sm->wpa == WPA_VERSION_WPA2) { -- if (key->type != EAPOL_KEY_TYPE_RSN) { -+ if (key->type == EAPOL_KEY_TYPE_WPA) { -+ /* -+ * Some deployed station implementations seem to send -+ * msg 4/4 with incorrect type value in WPA2 mode. -+ */ -+ wpa_printf(MSG_DEBUG, "Workaround: Allow EAPOL-Key " -+ "with unexpected WPA type in RSN mode"); -+ } else if (key->type != EAPOL_KEY_TYPE_RSN) { - wpa_printf(MSG_DEBUG, "Ignore EAPOL-Key with " - "unexpected type %d in RSN mode", - key->type);