aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-25 15:13:10 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-10-25 15:13:10 +0000
commit7d72767daf85d5345452aaa257f77b37a56ef5eb (patch)
treeb30705321a381e51e72eeaa7284c4c83b1d5d0d3
parent8b126d3edb9ce937ab8ce8f5514c72d730fdea48 (diff)
downloadopenwrt-7d72767daf85d5345452aaa257f77b37a56ef5eb.tar.gz
openwrt-7d72767daf85d5345452aaa257f77b37a56ef5eb.zip
hostapd: merge some pending fixes (fixes assoc errors when moving between vaps of the same wifi device)
Backport of r33919 git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33925 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/hostapd/patches/100-pending_work.patch42
-rw-r--r--package/hostapd/patches/410-multicall.patch2
2 files changed, 43 insertions, 1 deletions
diff --git a/package/hostapd/patches/100-pending_work.patch b/package/hostapd/patches/100-pending_work.patch
index 1c97a64ca..73949dd38 100644
--- a/package/hostapd/patches/100-pending_work.patch
+++ b/package/hostapd/patches/100-pending_work.patch
@@ -121,3 +121,45 @@
if (bss != &drv->first_bss) {
struct i802_bss *tbss;
+--- a/src/ap/drv_callbacks.c
++++ b/src/ap/drv_callbacks.c
+@@ -672,12 +672,15 @@ static void hostapd_event_eapol_rx(struc
+ const u8 *data, size_t data_len)
+ {
+ struct hostapd_iface *iface = hapd->iface;
++ struct sta_info *sta;
+ size_t j;
+
+ for (j = 0; j < iface->num_bss; j++) {
+- if (ap_get_sta(iface->bss[j], src)) {
+- hapd = iface->bss[j];
+- break;
++ if ((sta = ap_get_sta(iface->bss[j], src))) {
++ if (sta->flags & WLAN_STA_ASSOC) {
++ hapd = iface->bss[j];
++ break;
++ }
+ }
+ }
+
+--- a/src/eap_peer/eap.c
++++ b/src/eap_peer/eap.c
+@@ -348,6 +348,7 @@ SM_STATE(EAP, METHOD)
+ {
+ struct wpabuf *eapReqData;
+ struct eap_method_ret ret;
++ int min_len = 1;
+
+ SM_ENTRY(EAP, METHOD);
+ if (sm->m == NULL) {
+@@ -356,7 +357,9 @@ SM_STATE(EAP, METHOD)
+ }
+
+ eapReqData = eapol_get_eapReqData(sm);
+- if (!eap_hdr_len_valid(eapReqData, 1))
++ if (sm->m->vendor == EAP_VENDOR_IETF && sm->m->method == EAP_TYPE_LEAP)
++ min_len = 0; /* LEAP uses EAP-Success without payload */
++ if (!eap_hdr_len_valid(eapReqData, min_len))
+ return;
+
+ /*
diff --git a/package/hostapd/patches/410-multicall.patch b/package/hostapd/patches/410-multicall.patch
index 7900428ae..a774603b4 100644
--- a/package/hostapd/patches/410-multicall.patch
+++ b/package/hostapd/patches/410-multicall.patch
@@ -145,7 +145,7 @@
/*
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
-@@ -685,8 +685,8 @@ static void hostapd_event_eapol_rx(struc
+@@ -688,8 +688,8 @@ static void hostapd_event_eapol_rx(struc
}