hostapd: upgrade to 20100309

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20090 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2010-03-09 17:36:10 +00:00
parent 17efadd9ca
commit b93bed19e1
12 changed files with 47 additions and 1262 deletions

View File

@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
PKG_VERSION:=20100117
PKG_VERSION:=20100309
PKG_RELEASE:=1
PKG_REV:=43a7fe2e0e614e52fa05ff4d78af91bd4e17d3b2
PKG_REV:=7b90c16aa9ca377b1a6d160c1ba0f2bd304f7e2f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git

View File

@ -1,15 +1,15 @@
--- a/src/drivers/driver_madwifi.c
+++ b/src/drivers/driver_madwifi.c
@@ -1170,8 +1170,6 @@ madwifi_init(struct hostapd_data *hapd,
@@ -1177,8 +1177,6 @@ madwifi_init(struct hostapd_data *hapd,
goto bad;
}
- /* mark down during setup */
- linux_set_iface_flags(drv->ioctl_sock, drv->iface, 0);
madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
madwifi_set_privacy(drv, 0); /* default to no privacy */
madwifi_receive_probe_req(drv);
@@ -1261,8 +1259,7 @@ madwifi_set_countermeasures(void *priv,
@@ -1268,8 +1266,7 @@ madwifi_set_countermeasures(void *priv,
static int
madwifi_commit(void *priv)
{

View File

@ -1,6 +1,6 @@
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -649,7 +649,6 @@ static int setup_interface(struct hostap
@@ -650,7 +650,6 @@ static int setup_interface(struct hostap
country[3] = '\0';
if (hostapd_set_country(hapd, country) < 0) {
wpa_printf(MSG_ERROR, "Failed to set country code");

View File

@ -18,7 +18,7 @@
#ifdef HOSTAPD
@@ -1499,7 +1500,6 @@ wpa_driver_madwifi_set_key(const char *i
@@ -1506,7 +1507,6 @@ wpa_driver_madwifi_set_key(const char *i
wk.ik_keyix = key_idx;
wk.ik_keylen = key_len;
#ifdef WORDS_BIGENDIAN

View File

@ -10,7 +10,7 @@
/* hostapd.c */
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -745,6 +745,9 @@ int hostapd_setup_interface_complete(str
@@ -746,6 +746,9 @@ int hostapd_setup_interface_complete(str
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
@ -116,7 +116,7 @@
os_program_deinit();
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -1854,6 +1854,8 @@ struct hostapd_config * hostapd_config_r
@@ -1855,6 +1855,8 @@ struct hostapd_config * hostapd_config_r
}
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_IEEE80211N

View File

@ -1,12 +0,0 @@
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -121,7 +121,8 @@ void ap_free_sta(struct hostapd_data *ha
accounting_sta_stop(hapd, sta);
- hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
+ if (sta->flags & WLAN_STA_WDS)
+ hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
!(sta->flags & WLAN_STA_PREAUTH))
hapd->drv.sta_remove(hapd, sta->addr);

File diff suppressed because it is too large Load Diff

View File

@ -1,79 +0,0 @@
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -32,8 +32,8 @@
#include "vlan_init.h"
#include "sta_info.h"
-static int ap_sta_in_other_bss(struct hostapd_data *hapd,
- struct sta_info *sta, u32 flags);
+static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
+ struct sta_info *sta);
static void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx);
#ifdef CONFIG_IEEE80211W
static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx);
@@ -123,8 +123,8 @@ void ap_free_sta(struct hostapd_data *ha
if (sta->flags & WLAN_STA_WDS)
hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
- !(sta->flags & WLAN_STA_PREAUTH))
+
+ if (!(sta->flags & WLAN_STA_PREAUTH))
hapd->drv.sta_remove(hapd, sta->addr);
ap_sta_hash_del(hapd, sta);
@@ -451,6 +451,7 @@ struct sta_info * ap_sta_add(struct host
hapd->num_sta++;
ap_sta_hash_add(hapd, sta);
sta->ssid = &hapd->conf->ssid;
+ ap_sta_remove_in_other_bss(hapd, sta);
return sta;
}
@@ -472,8 +473,8 @@ static int ap_sta_remove(struct hostapd_
}
-static int ap_sta_in_other_bss(struct hostapd_data *hapd,
- struct sta_info *sta, u32 flags)
+static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
+ struct sta_info *sta)
{
struct hostapd_iface *iface = hapd->iface;
size_t i;
@@ -488,11 +489,11 @@ static int ap_sta_in_other_bss(struct ho
if (bss == hapd || bss == NULL)
continue;
sta2 = ap_get_sta(bss, sta->addr);
- if (sta2 && ((sta2->flags & flags) == flags))
- return 1;
- }
+ if (!sta2)
+ continue;
- return 0;
+ ap_sta_disconnect(bss, sta2, sta2->addr, WLAN_REASON_DEAUTH_LEAVING);
+ }
}
@@ -502,8 +503,7 @@ void ap_sta_disassociate(struct hostapd_
wpa_printf(MSG_DEBUG, "%s: disassociate STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
sta->flags &= ~WLAN_STA_ASSOC;
- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC))
- ap_sta_remove(hapd, sta);
+ ap_sta_remove(hapd, sta);
sta->timeout_next = STA_DEAUTH;
eloop_cancel_timeout(ap_handle_timer, hapd, sta);
eloop_register_timeout(AP_MAX_INACTIVITY_AFTER_DISASSOC, 0,
@@ -521,8 +521,7 @@ void ap_sta_deauthenticate(struct hostap
wpa_printf(MSG_DEBUG, "%s: deauthenticate STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC))
- ap_sta_remove(hapd, sta);
+ ap_sta_remove(hapd, sta);
sta->timeout_next = STA_REMOVE;
eloop_cancel_timeout(ap_handle_timer, hapd, sta);
eloop_register_timeout(AP_MAX_INACTIVITY_AFTER_DEAUTH, 0,

View File

@ -75,18 +75,18 @@
ifdef CONFIG_AP
@@ -631,6 +636,12 @@ CFLAGS += -DEAP_SERVER_WSC
OBJS += ../src/ap/wps_hostapd.o
OBJS += ../src/eap_server/eap_wsc.o
OBJS += ../src/eap_server/eap_server_wsc.o
endif
+else
+ ifdef MULTICALL
+ OBJS += ../src/eap_server/eap.o
+ OBJS += ../src/eap_server/eap_identity.o
+ OBJS += ../src/eap_server/eap_methods.o
+ OBJS += ../src/eap_server/eap_server.o
+ OBJS += ../src/eap_server/eap_server_identity.o
+ OBJS += ../src/eap_server/eap_server_methods.o
+ endif
endif
ifdef NEED_RSN_AUTHENTICATOR
@@ -1260,6 +1271,12 @@ BCHECK=../src/drivers/build.wpa_supplica
@@ -1261,6 +1272,12 @@ BCHECK=../src/drivers/build.wpa_supplica
wpa_priv: $(BCHECK) $(OBJS_priv)
$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
@ -99,7 +99,7 @@
wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
@@ -1319,6 +1336,12 @@ endif
@@ -1320,6 +1337,12 @@ endif
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
@$(E) " CC " $<
@ -114,7 +114,7 @@
wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2384,8 +2384,8 @@ union wpa_event_data {
@@ -2413,8 +2413,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received
* from the driver.
*/
@ -169,7 +169,7 @@
for (;;) {
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1425,8 +1425,8 @@ static void wpa_supplicant_event_ibss_rs
@@ -1506,8 +1506,8 @@ static void wpa_supplicant_event_ibss_rs
#endif /* CONFIG_IBSS_RSN */

View File

@ -1,14 +1,14 @@
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -215,6 +215,7 @@ static void wpa_supplicant_scan(void *el
@@ -248,6 +248,7 @@ static void wpa_supplicant_scan(void *el
enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
#endif /* CONFIG_WPS */
struct wpa_driver_scan_params params;
+ int scan_ssid_all = 1;
size_t max_ssids;
enum wpa_states prev_state;
if (wpa_s->disconnected && !wpa_s->scan_req) {
@@ -275,6 +276,16 @@ static void wpa_supplicant_scan(void *el
@@ -310,6 +311,16 @@ static void wpa_supplicant_scan(void *el
wpa_s->wpa_state == WPA_INACTIVE)
wpa_supplicant_set_state(wpa_s, WPA_SCANNING);
@ -25,7 +25,7 @@
/* Find the starting point from which to continue scanning */
ssid = wpa_s->conf->ssid;
if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
@@ -336,6 +347,9 @@ static void wpa_supplicant_scan(void *el
@@ -371,6 +382,9 @@ static void wpa_supplicant_scan(void *el
int_array_sort_unique(params.freqs);
}

View File

@ -1,6 +1,6 @@
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -843,7 +843,7 @@ static void wpa_supplicant_event_scan_re
@@ -924,7 +924,7 @@ static void wpa_supplicant_event_scan_re
wpa_printf(MSG_DEBUG, "Setup a new network");
wpa_supplicant_associate(wpa_s, NULL, ssid);
} else

View File

@ -145,7 +145,7 @@
madwifi_raw_receive, drv, 1);
if (drv->sock_raw == NULL)
return -1;
@@ -1017,7 +1019,7 @@ madwifi_get_we_version(struct madwifi_dr
@@ -1016,7 +1018,7 @@ madwifi_get_we_version(struct madwifi_dr
return -1;
memset(&iwr, 0, sizeof(iwr));
@ -154,7 +154,7 @@
iwr.u.data.pointer = (caddr_t) range;
iwr.u.data.length = buflen;
@@ -1134,17 +1136,17 @@ madwifi_init(struct hostapd_data *hapd,
@@ -1133,17 +1135,17 @@ madwifi_init(struct hostapd_data *hapd,
perror("socket[PF_INET,SOCK_DGRAM]");
goto bad;
}
@ -175,7 +175,7 @@
handle_read, drv, 1);
if (drv->sock_xmit == NULL)
goto bad;
@@ -1158,7 +1160,7 @@ madwifi_init(struct hostapd_data *hapd,
@@ -1157,7 +1159,7 @@ madwifi_init(struct hostapd_data *hapd,
1);
if (drv->sock_recv == NULL)
goto bad;
@ -184,7 +184,7 @@
wpa_printf(MSG_DEBUG, "Interface in bridge %s; configure for "
"EAPOL receive", brname);
drv->sock_recv = l2_packet_init(brname, NULL, ETH_P_EAPOL,
@@ -1169,7 +1171,7 @@ madwifi_init(struct hostapd_data *hapd,
@@ -1168,7 +1170,7 @@ madwifi_init(struct hostapd_data *hapd,
drv->sock_recv = drv->sock_xmit;
memset(&iwr, 0, sizeof(iwr));
@ -193,16 +193,7 @@
iwr.u.mode = IW_MODE_MASTER;
@@ -1179,7 +1181,7 @@ madwifi_init(struct hostapd_data *hapd,
goto bad;
}
- madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
+ madwifi_set_privacy(drv->ifname, drv, 0); /* default to no privacy */
madwifi_receive_probe_req(drv);
@@ -1204,7 +1206,7 @@ madwifi_deinit(void *priv)
@@ -1203,7 +1205,7 @@ madwifi_deinit(void *priv)
struct madwifi_driver_data *drv = priv;
netlink_deinit(drv->netlink);
@ -211,7 +202,7 @@
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
@@ -1223,7 +1225,7 @@ madwifi_set_ssid(const char *ifname, voi
@@ -1222,7 +1224,7 @@ madwifi_set_ssid(void *priv, const u8 *b
struct iwreq iwr;
memset(&iwr, 0, sizeof(iwr));
@ -220,7 +211,7 @@
iwr.u.essid.flags = 1; /* SSID active */
iwr.u.essid.pointer = (caddr_t) buf;
iwr.u.essid.length = len + 1;
@@ -1244,7 +1246,7 @@ madwifi_get_ssid(const char *ifname, voi
@@ -1243,7 +1245,7 @@ madwifi_get_ssid(void *priv, u8 *buf, in
int ret = 0;
memset(&iwr, 0, sizeof(iwr));
@ -229,7 +220,7 @@
iwr.u.essid.pointer = (caddr_t) buf;
iwr.u.essid.length = len;
@@ -1271,137 +1273,16 @@ madwifi_commit(void *priv)
@@ -1270,137 +1272,16 @@ madwifi_commit(void *priv)
return 0;
}
@ -370,7 +361,7 @@
const u8 *wpa_ie, size_t wpa_ie_len)
{
struct iwreq iwr;
@@ -1412,7 +1293,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
@@ -1411,7 +1292,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
iwr.u.data.pointer = (void *) wpa_ie;
iwr.u.data.length = wpa_ie_len;
@ -379,7 +370,7 @@
perror("ioctl[IEEE80211_IOCTL_SETOPTIE]");
return -1;
}
@@ -1420,156 +1301,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
@@ -1419,156 +1300,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
}
static int
@ -544,7 +535,7 @@
ret = -1;
if (wpa_driver_madwifi_set_auth_alg(drv, params->auth_alg) < 0)
ret = -1;
@@ -1592,12 +1368,12 @@ wpa_driver_madwifi_associate(void *priv,
@@ -1591,12 +1367,12 @@ wpa_driver_madwifi_associate(void *priv,
params->wpa_ie_len == 0)
privacy = 0;
@ -559,7 +550,7 @@
ret = -1;
if (params->bssid == NULL) {
@@ -1605,14 +1381,14 @@ wpa_driver_madwifi_associate(void *priv,
@@ -1604,14 +1380,14 @@ wpa_driver_madwifi_associate(void *priv,
* roaming */
/* FIX: this does not seem to work; would probably need to
* change something in the driver */
@ -576,7 +567,7 @@
ret = -1;
if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
params->ssid_len) < 0)
@@ -1621,7 +1397,7 @@ wpa_driver_madwifi_associate(void *priv,
@@ -1620,7 +1396,7 @@ wpa_driver_madwifi_associate(void *priv,
mlme.im_op = IEEE80211_MLME_ASSOC;
os_memcpy(mlme.im_macaddr, params->bssid, IEEE80211_ADDR_LEN);
if (set80211priv(drv, IEEE80211_IOCTL_SETMLME, &mlme,
@ -585,7 +576,7 @@
wpa_printf(MSG_DEBUG, "%s: SETMLME[ASSOC] failed",
__func__);
ret = -1;
@@ -1634,7 +1410,7 @@ wpa_driver_madwifi_associate(void *priv,
@@ -1633,7 +1409,7 @@ wpa_driver_madwifi_associate(void *priv,
static int
wpa_driver_madwifi_set_auth_alg(void *priv, int auth_alg)
{
@ -594,7 +585,7 @@
int authmode;
if ((auth_alg & WPA_AUTH_ALG_OPEN) &&
@@ -1645,13 +1421,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
@@ -1644,13 +1420,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
else
authmode = IEEE80211_AUTH_OPEN;
@ -610,7 +601,7 @@
struct iwreq iwr;
int ret = 0;
const u8 *ssid = params->ssids[0].ssid;
@@ -1669,7 +1445,7 @@ wpa_driver_madwifi_scan(void *priv, stru
@@ -1668,7 +1444,7 @@ wpa_driver_madwifi_scan(void *priv, stru
if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0)
ret = -1;
@ -619,7 +610,7 @@
perror("ioctl[SIOCSIWSCAN]");
ret = -1;
}
@@ -1691,14 +1467,14 @@ wpa_driver_madwifi_scan(void *priv, stru
@@ -1690,14 +1466,14 @@ wpa_driver_madwifi_scan(void *priv, stru
static int wpa_driver_madwifi_get_bssid(void *priv, u8 *bssid)
{
@ -636,7 +627,7 @@
return wpa_driver_wext_get_ssid(drv->wext, ssid);
}
@@ -1706,14 +1482,14 @@ static int wpa_driver_madwifi_get_ssid(v
@@ -1705,14 +1481,14 @@ static int wpa_driver_madwifi_get_ssid(v
static struct wpa_scan_results *
wpa_driver_madwifi_get_scan_results(void *priv)
{
@ -653,7 +644,7 @@
return wpa_driver_wext_set_operstate(drv->wext, state);
}
@@ -1734,7 +1510,7 @@ static int wpa_driver_madwifi_set_probe_
@@ -1733,7 +1509,7 @@ static int wpa_driver_madwifi_set_probe_
ret = set80211priv(priv, IEEE80211_IOCTL_SET_APPIEBUF, probe_req_ie,
sizeof(struct ieee80211req_getset_appiebuf) +
@ -662,7 +653,7 @@
os_free(probe_req_ie);
@@ -1744,7 +1520,7 @@ static int wpa_driver_madwifi_set_probe_
@@ -1743,7 +1519,7 @@ static int wpa_driver_madwifi_set_probe_
static void * wpa_driver_madwifi_init(void *ctx, const char *ifname)
{
@ -671,7 +662,7 @@
drv = os_zalloc(sizeof(*drv));
if (drv == NULL)
@@ -1755,17 +1531,17 @@ static void * wpa_driver_madwifi_init(vo
@@ -1754,17 +1530,17 @@ static void * wpa_driver_madwifi_init(vo
drv->ctx = ctx;
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
@ -693,7 +684,7 @@
wpa_printf(MSG_DEBUG, "%s: failed to enable WPA support",
__FUNCTION__);
goto fail3;
@@ -1774,7 +1550,7 @@ static void * wpa_driver_madwifi_init(vo
@@ -1773,7 +1549,7 @@ static void * wpa_driver_madwifi_init(vo
return drv;
fail3:
@ -702,7 +693,7 @@
fail2:
wpa_driver_wext_deinit(drv->wext);
fail:
@@ -1785,38 +1561,37 @@ fail:
@@ -1784,38 +1560,37 @@ fail:
static void wpa_driver_madwifi_deinit(void *priv)
{
@ -748,7 +739,7 @@
#ifdef HOSTAPD
.hapd_init = madwifi_init,
.hapd_deinit = madwifi_deinit,
@@ -1836,7 +1611,8 @@ const struct wpa_driver_ops wpa_driver_m
@@ -1835,7 +1610,8 @@ const struct wpa_driver_ops wpa_driver_m
.sta_clear_stats = madwifi_sta_clear_stats,
.commit = madwifi_commit,
.set_ap_wps_ie = madwifi_set_ap_wps_ie,
@ -758,7 +749,7 @@
.get_bssid = wpa_driver_madwifi_get_bssid,
.get_ssid = wpa_driver_madwifi_get_ssid,
.init = wpa_driver_madwifi_init,
@@ -1848,5 +1624,5 @@ const struct wpa_driver_ops wpa_driver_m
@@ -1847,5 +1623,5 @@ const struct wpa_driver_ops wpa_driver_m
.disassociate = wpa_driver_madwifi_disassociate,
.associate = wpa_driver_madwifi_associate,
.set_operstate = wpa_driver_madwifi_set_operstate,