mirror of https://github.com/hak5/openwrt.git
parent
dab5ebaa76
commit
c8321c3ca6
|
@ -8,16 +8,16 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostapd
|
PKG_NAME:=hostapd
|
||||||
PKG_VERSION:=20110527
|
PKG_VERSION:=20111103
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
PKG_REV:=ceb34f250af7a7082f18c1e0451dc7fbc0f000f3
|
PKG_REV:=6caaae1e48da247b21b54ea6001646597e35d9b1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
|
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_MIRROR_MD5SUM:=4b98902d782813b41aca1faff613f677
|
PKG_MIRROR_MD5SUM:=2650d83c1d4649a5df9fe265f8a5775f
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:= \
|
PKG_BUILD_DEPENDS:= \
|
||||||
PACKAGE_kmod-madwifi:madwifi \
|
PACKAGE_kmod-madwifi:madwifi \
|
||||||
|
|
|
@ -0,0 +1,162 @@
|
||||||
|
--- a/src/ap/ieee802_11.c
|
||||||
|
+++ b/src/ap/ieee802_11.c
|
||||||
|
@@ -1471,13 +1471,6 @@ static void handle_assoc_cb(struct hosta
|
||||||
|
int new_assoc = 1;
|
||||||
|
struct ieee80211_ht_capabilities ht_cap;
|
||||||
|
|
||||||
|
- if (!ok) {
|
||||||
|
- hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
|
||||||
|
- HOSTAPD_LEVEL_DEBUG,
|
||||||
|
- "did not acknowledge association response");
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
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
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (reassoc)
|
||||||
|
- status = le_to_host16(mgmt->u.reassoc_resp.status_code);
|
||||||
|
- else
|
||||||
|
- status = le_to_host16(mgmt->u.assoc_resp.status_code);
|
||||||
|
-
|
||||||
|
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
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!ok) {
|
||||||
|
+ hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
|
||||||
|
+ HOSTAPD_LEVEL_DEBUG,
|
||||||
|
+ "did not acknowledge association response");
|
||||||
|
+ sta->flags &= ~WLAN_STA_ASSOC_REQ_OK;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (reassoc)
|
||||||
|
+ status = le_to_host16(mgmt->u.reassoc_resp.status_code);
|
||||||
|
+ else
|
||||||
|
+ status = le_to_host16(mgmt->u.assoc_resp.status_code);
|
||||||
|
+
|
||||||
|
if (status != WLAN_STATUS_SUCCESS)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
--- 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;
|
||||||
|
|
||||||
|
if (linux_get_ifhwaddr(drv->global->ioctl_sock, bss->ifname,
|
||||||
|
- drv->addr))
|
||||||
|
+ bss->addr))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (nl80211_register_action_frames(drv) < 0) {
|
||||||
|
@@ -5176,8 +5176,8 @@ static int wpa_driver_nl80211_hapd_send_
|
||||||
|
pos = (u8 *) (hdr + 1);
|
||||||
|
|
||||||
|
if (qos) {
|
||||||
|
- /* add an empty QoS header if needed */
|
||||||
|
- pos[0] = 0;
|
||||||
|
+ /* Set highest priority in QoS header */
|
||||||
|
+ pos[0] = 7;
|
||||||
|
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);
|
||||||
|
return i802_set_sta_vlan(priv, addr, name, 0);
|
||||||
|
} else {
|
||||||
|
+ if (bridge_ifname)
|
||||||
|
+ linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
|
||||||
|
+ name);
|
||||||
|
+
|
||||||
|
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(
|
||||||
|
if (ifindex <= 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
+ nl80211_remove_iface(drv, ifindex);
|
||||||
|
+
|
||||||
|
#ifdef HOSTAPD
|
||||||
|
+ if (type != WPA_IF_AP_BSS)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
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(
|
||||||
|
"bridge %s: %s",
|
||||||
|
bss->brname, strerror(errno));
|
||||||
|
}
|
||||||
|
-#endif /* HOSTAPD */
|
||||||
|
-
|
||||||
|
- nl80211_remove_iface(drv, ifindex);
|
||||||
|
-
|
||||||
|
-#ifdef HOSTAPD
|
||||||
|
- if (type != WPA_IF_AP_BSS)
|
||||||
|
- return 0;
|
||||||
|
|
||||||
|
if (bss != &drv->first_bss) {
|
||||||
|
struct i802_bss *tbss;
|
|
@ -1,16 +1,16 @@
|
||||||
--- a/wpa_supplicant/scan.c
|
--- a/wpa_supplicant/scan.c
|
||||||
+++ b/wpa_supplicant/scan.c
|
+++ b/wpa_supplicant/scan.c
|
||||||
@@ -251,6 +251,7 @@ static void wpa_supplicant_scan(void *el
|
@@ -423,6 +423,7 @@ static void wpa_supplicant_scan(void *el
|
||||||
enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
|
int scan_req = 0, ret;
|
||||||
#endif /* CONFIG_WPS */
|
struct wpabuf *extra_ie;
|
||||||
struct wpa_driver_scan_params params;
|
struct wpa_driver_scan_params params;
|
||||||
+ int scan_ssid_all = 1;
|
+ int scan_ssid_all = 1;
|
||||||
size_t max_ssids;
|
size_t max_ssids;
|
||||||
enum wpa_states prev_state;
|
enum wpa_states prev_state;
|
||||||
|
|
||||||
@@ -307,6 +308,16 @@ static void wpa_supplicant_scan(void *el
|
@@ -502,6 +503,16 @@ static void wpa_supplicant_scan(void *el
|
||||||
wpa_s->wpa_state == WPA_INACTIVE)
|
}
|
||||||
wpa_supplicant_set_state(wpa_s, WPA_SCANNING);
|
}
|
||||||
|
|
||||||
+ /* check if all configured ssids should be scanned directly */
|
+ /* check if all configured ssids should be scanned directly */
|
||||||
+ ssid = wpa_s->conf->ssid;
|
+ ssid = wpa_s->conf->ssid;
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
/* Find the starting point from which to continue scanning */
|
/* Find the starting point from which to continue scanning */
|
||||||
ssid = wpa_s->conf->ssid;
|
ssid = wpa_s->conf->ssid;
|
||||||
if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
|
if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
|
||||||
@@ -370,6 +381,9 @@ static void wpa_supplicant_scan(void *el
|
@@ -564,6 +575,9 @@ static void wpa_supplicant_scan(void *el
|
||||||
int_array_sort_unique(params.freqs);
|
int_array_sort_unique(params.freqs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
|
|
||||||
f = fopen(buf, "r");
|
f = fopen(buf, "r");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@@ -757,7 +758,7 @@ static int madwifi_receive_probe_req(str
|
@@ -759,7 +760,7 @@ static int madwifi_receive_probe_req(str
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -140,7 +140,16 @@
|
||||||
madwifi_raw_receive, drv, 1);
|
madwifi_raw_receive, drv, 1);
|
||||||
if (drv->sock_raw == NULL)
|
if (drv->sock_raw == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1017,7 +1018,7 @@ madwifi_get_we_version(struct madwifi_dr
|
@@ -812,7 +813,7 @@ static int madwifi_set_freq(void *priv,
|
||||||
|
struct iwreq iwr;
|
||||||
|
|
||||||
|
os_memset(&iwr, 0, sizeof(iwr));
|
||||||
|
- os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
|
||||||
|
+ os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
|
||||||
|
iwr.u.freq.m = freq->channel;
|
||||||
|
iwr.u.freq.e = 0;
|
||||||
|
|
||||||
|
@@ -1037,7 +1038,7 @@ madwifi_get_we_version(struct madwifi_dr
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
memset(&iwr, 0, sizeof(iwr));
|
memset(&iwr, 0, sizeof(iwr));
|
||||||
|
@ -149,7 +158,7 @@
|
||||||
iwr.u.data.pointer = (caddr_t) range;
|
iwr.u.data.pointer = (caddr_t) range;
|
||||||
iwr.u.data.length = buflen;
|
iwr.u.data.length = buflen;
|
||||||
|
|
||||||
@@ -1134,17 +1135,17 @@ madwifi_init(struct hostapd_data *hapd,
|
@@ -1154,17 +1155,17 @@ madwifi_init(struct hostapd_data *hapd,
|
||||||
perror("socket[PF_INET,SOCK_DGRAM]");
|
perror("socket[PF_INET,SOCK_DGRAM]");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +179,7 @@
|
||||||
handle_read, drv, 1);
|
handle_read, drv, 1);
|
||||||
if (drv->sock_xmit == NULL)
|
if (drv->sock_xmit == NULL)
|
||||||
goto bad;
|
goto bad;
|
||||||
@@ -1158,7 +1159,7 @@ madwifi_init(struct hostapd_data *hapd,
|
@@ -1178,7 +1179,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||||
1);
|
1);
|
||||||
if (drv->sock_recv == NULL)
|
if (drv->sock_recv == NULL)
|
||||||
goto bad;
|
goto bad;
|
||||||
|
@ -179,7 +188,7 @@
|
||||||
wpa_printf(MSG_DEBUG, "Interface in bridge %s; configure for "
|
wpa_printf(MSG_DEBUG, "Interface in bridge %s; configure for "
|
||||||
"EAPOL receive", brname);
|
"EAPOL receive", brname);
|
||||||
drv->sock_recv = l2_packet_init(brname, NULL, ETH_P_EAPOL,
|
drv->sock_recv = l2_packet_init(brname, NULL, ETH_P_EAPOL,
|
||||||
@@ -1169,7 +1170,7 @@ madwifi_init(struct hostapd_data *hapd,
|
@@ -1189,7 +1190,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||||
drv->sock_recv = drv->sock_xmit;
|
drv->sock_recv = drv->sock_xmit;
|
||||||
|
|
||||||
memset(&iwr, 0, sizeof(iwr));
|
memset(&iwr, 0, sizeof(iwr));
|
||||||
|
@ -188,7 +197,7 @@
|
||||||
|
|
||||||
iwr.u.mode = IW_MODE_MASTER;
|
iwr.u.mode = IW_MODE_MASTER;
|
||||||
|
|
||||||
@@ -1180,7 +1181,7 @@ madwifi_init(struct hostapd_data *hapd,
|
@@ -1200,7 +1201,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mark down during setup */
|
/* mark down during setup */
|
||||||
|
@ -197,7 +206,7 @@
|
||||||
madwifi_set_privacy(drv, 0); /* default to no privacy */
|
madwifi_set_privacy(drv, 0); /* default to no privacy */
|
||||||
|
|
||||||
madwifi_receive_probe_req(drv);
|
madwifi_receive_probe_req(drv);
|
||||||
@@ -1206,7 +1207,7 @@ madwifi_deinit(void *priv)
|
@@ -1226,7 +1227,7 @@ madwifi_deinit(void *priv)
|
||||||
struct madwifi_driver_data *drv = priv;
|
struct madwifi_driver_data *drv = priv;
|
||||||
|
|
||||||
netlink_deinit(drv->netlink);
|
netlink_deinit(drv->netlink);
|
||||||
|
@ -206,7 +215,7 @@
|
||||||
if (drv->ioctl_sock >= 0)
|
if (drv->ioctl_sock >= 0)
|
||||||
close(drv->ioctl_sock);
|
close(drv->ioctl_sock);
|
||||||
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
|
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
|
||||||
@@ -1225,7 +1226,7 @@ madwifi_set_ssid(void *priv, const u8 *b
|
@@ -1245,7 +1246,7 @@ madwifi_set_ssid(void *priv, const u8 *b
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
|
|
||||||
memset(&iwr, 0, sizeof(iwr));
|
memset(&iwr, 0, sizeof(iwr));
|
||||||
|
@ -215,7 +224,7 @@
|
||||||
iwr.u.essid.flags = 1; /* SSID active */
|
iwr.u.essid.flags = 1; /* SSID active */
|
||||||
iwr.u.essid.pointer = (caddr_t) buf;
|
iwr.u.essid.pointer = (caddr_t) buf;
|
||||||
iwr.u.essid.length = len + 1;
|
iwr.u.essid.length = len + 1;
|
||||||
@@ -1246,7 +1247,7 @@ madwifi_get_ssid(void *priv, u8 *buf, in
|
@@ -1266,7 +1267,7 @@ madwifi_get_ssid(void *priv, u8 *buf, in
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
memset(&iwr, 0, sizeof(iwr));
|
memset(&iwr, 0, sizeof(iwr));
|
||||||
|
@ -224,7 +233,7 @@
|
||||||
iwr.u.essid.pointer = (caddr_t) buf;
|
iwr.u.essid.pointer = (caddr_t) buf;
|
||||||
iwr.u.essid.length = len;
|
iwr.u.essid.length = len;
|
||||||
|
|
||||||
@@ -1271,140 +1272,19 @@ static int
|
@@ -1291,140 +1292,19 @@ static int
|
||||||
madwifi_commit(void *priv)
|
madwifi_commit(void *priv)
|
||||||
{
|
{
|
||||||
struct madwifi_driver_data *drv = priv;
|
struct madwifi_driver_data *drv = priv;
|
||||||
|
@ -344,7 +353,7 @@
|
||||||
- return 0;
|
- return 0;
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-static int
|
static int
|
||||||
-set80211param(struct wpa_driver_madwifi_data *drv, int op, int arg,
|
-set80211param(struct wpa_driver_madwifi_data *drv, int op, int arg,
|
||||||
- int show_err)
|
- int show_err)
|
||||||
-{
|
-{
|
||||||
|
@ -363,13 +372,13 @@
|
||||||
- return 0;
|
- return 0;
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
static int
|
-static int
|
||||||
-wpa_driver_madwifi_set_wpa_ie(struct wpa_driver_madwifi_data *drv,
|
-wpa_driver_madwifi_set_wpa_ie(struct wpa_driver_madwifi_data *drv,
|
||||||
+wpa_driver_madwifi_set_wpa_ie(struct madwifi_driver_data *drv,
|
+wpa_driver_madwifi_set_wpa_ie(struct madwifi_driver_data *drv,
|
||||||
const u8 *wpa_ie, size_t wpa_ie_len)
|
const u8 *wpa_ie, size_t wpa_ie_len)
|
||||||
{
|
{
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
@@ -1415,7 +1295,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
@@ -1435,7 +1315,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
||||||
iwr.u.data.pointer = (void *) wpa_ie;
|
iwr.u.data.pointer = (void *) wpa_ie;
|
||||||
iwr.u.data.length = wpa_ie_len;
|
iwr.u.data.length = wpa_ie_len;
|
||||||
|
|
||||||
|
@ -378,7 +387,7 @@
|
||||||
perror("ioctl[IEEE80211_IOCTL_SETOPTIE]");
|
perror("ioctl[IEEE80211_IOCTL_SETOPTIE]");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -1423,157 +1303,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
@@ -1443,157 +1323,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -544,7 +553,7 @@
|
||||||
ret = -1;
|
ret = -1;
|
||||||
if (wpa_driver_madwifi_set_auth_alg(drv, params->auth_alg) < 0)
|
if (wpa_driver_madwifi_set_auth_alg(drv, params->auth_alg) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
@@ -1596,12 +1370,12 @@ wpa_driver_madwifi_associate(void *priv,
|
@@ -1616,12 +1390,12 @@ wpa_driver_madwifi_associate(void *priv,
|
||||||
params->wpa_ie_len == 0)
|
params->wpa_ie_len == 0)
|
||||||
privacy = 0;
|
privacy = 0;
|
||||||
|
|
||||||
|
@ -559,7 +568,7 @@
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
if (params->bssid == NULL) {
|
if (params->bssid == NULL) {
|
||||||
@@ -1609,14 +1383,14 @@ wpa_driver_madwifi_associate(void *priv,
|
@@ -1629,14 +1403,14 @@ wpa_driver_madwifi_associate(void *priv,
|
||||||
* roaming */
|
* roaming */
|
||||||
/* FIX: this does not seem to work; would probably need to
|
/* FIX: this does not seem to work; would probably need to
|
||||||
* change something in the driver */
|
* change something in the driver */
|
||||||
|
@ -576,7 +585,7 @@
|
||||||
ret = -1;
|
ret = -1;
|
||||||
if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
|
if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
|
||||||
params->ssid_len) < 0)
|
params->ssid_len) < 0)
|
||||||
@@ -1625,7 +1399,7 @@ wpa_driver_madwifi_associate(void *priv,
|
@@ -1645,7 +1419,7 @@ wpa_driver_madwifi_associate(void *priv,
|
||||||
mlme.im_op = IEEE80211_MLME_ASSOC;
|
mlme.im_op = IEEE80211_MLME_ASSOC;
|
||||||
os_memcpy(mlme.im_macaddr, params->bssid, IEEE80211_ADDR_LEN);
|
os_memcpy(mlme.im_macaddr, params->bssid, IEEE80211_ADDR_LEN);
|
||||||
if (set80211priv(drv, IEEE80211_IOCTL_SETMLME, &mlme,
|
if (set80211priv(drv, IEEE80211_IOCTL_SETMLME, &mlme,
|
||||||
|
@ -585,7 +594,7 @@
|
||||||
wpa_printf(MSG_DEBUG, "%s: SETMLME[ASSOC] failed",
|
wpa_printf(MSG_DEBUG, "%s: SETMLME[ASSOC] failed",
|
||||||
__func__);
|
__func__);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
@@ -1638,7 +1412,7 @@ wpa_driver_madwifi_associate(void *priv,
|
@@ -1658,7 +1432,7 @@ wpa_driver_madwifi_associate(void *priv,
|
||||||
static int
|
static int
|
||||||
wpa_driver_madwifi_set_auth_alg(void *priv, int auth_alg)
|
wpa_driver_madwifi_set_auth_alg(void *priv, int auth_alg)
|
||||||
{
|
{
|
||||||
|
@ -594,7 +603,7 @@
|
||||||
int authmode;
|
int authmode;
|
||||||
|
|
||||||
if ((auth_alg & WPA_AUTH_ALG_OPEN) &&
|
if ((auth_alg & WPA_AUTH_ALG_OPEN) &&
|
||||||
@@ -1649,13 +1423,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
|
@@ -1669,13 +1443,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
|
||||||
else
|
else
|
||||||
authmode = IEEE80211_AUTH_OPEN;
|
authmode = IEEE80211_AUTH_OPEN;
|
||||||
|
|
||||||
|
@ -610,7 +619,7 @@
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
const u8 *ssid = params->ssids[0].ssid;
|
const u8 *ssid = params->ssids[0].ssid;
|
||||||
@@ -1673,7 +1447,7 @@ wpa_driver_madwifi_scan(void *priv, stru
|
@@ -1693,7 +1467,7 @@ wpa_driver_madwifi_scan(void *priv, stru
|
||||||
if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0)
|
if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
|
@ -619,7 +628,7 @@
|
||||||
perror("ioctl[SIOCSIWSCAN]");
|
perror("ioctl[SIOCSIWSCAN]");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
@@ -1695,14 +1469,14 @@ wpa_driver_madwifi_scan(void *priv, stru
|
@@ -1715,14 +1489,14 @@ wpa_driver_madwifi_scan(void *priv, stru
|
||||||
|
|
||||||
static int wpa_driver_madwifi_get_bssid(void *priv, u8 *bssid)
|
static int wpa_driver_madwifi_get_bssid(void *priv, u8 *bssid)
|
||||||
{
|
{
|
||||||
|
@ -636,7 +645,7 @@
|
||||||
return wpa_driver_wext_get_ssid(drv->wext, ssid);
|
return wpa_driver_wext_get_ssid(drv->wext, ssid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1710,14 +1484,16 @@ static int wpa_driver_madwifi_get_ssid(v
|
@@ -1730,14 +1504,16 @@ static int wpa_driver_madwifi_get_ssid(v
|
||||||
static struct wpa_scan_results *
|
static struct wpa_scan_results *
|
||||||
wpa_driver_madwifi_get_scan_results(void *priv)
|
wpa_driver_madwifi_get_scan_results(void *priv)
|
||||||
{
|
{
|
||||||
|
@ -655,7 +664,7 @@
|
||||||
return wpa_driver_wext_set_operstate(drv->wext, state);
|
return wpa_driver_wext_set_operstate(drv->wext, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1738,7 +1514,7 @@ static int wpa_driver_madwifi_set_probe_
|
@@ -1758,7 +1534,7 @@ static int wpa_driver_madwifi_set_probe_
|
||||||
|
|
||||||
ret = set80211priv(priv, IEEE80211_IOCTL_SET_APPIEBUF, probe_req_ie,
|
ret = set80211priv(priv, IEEE80211_IOCTL_SET_APPIEBUF, probe_req_ie,
|
||||||
sizeof(struct ieee80211req_getset_appiebuf) +
|
sizeof(struct ieee80211req_getset_appiebuf) +
|
||||||
|
@ -664,7 +673,7 @@
|
||||||
|
|
||||||
os_free(probe_req_ie);
|
os_free(probe_req_ie);
|
||||||
|
|
||||||
@@ -1748,7 +1524,7 @@ static int wpa_driver_madwifi_set_probe_
|
@@ -1768,7 +1544,7 @@ static int wpa_driver_madwifi_set_probe_
|
||||||
|
|
||||||
static void * wpa_driver_madwifi_init(void *ctx, const char *ifname)
|
static void * wpa_driver_madwifi_init(void *ctx, const char *ifname)
|
||||||
{
|
{
|
||||||
|
@ -673,7 +682,7 @@
|
||||||
|
|
||||||
drv = os_zalloc(sizeof(*drv));
|
drv = os_zalloc(sizeof(*drv));
|
||||||
if (drv == NULL)
|
if (drv == NULL)
|
||||||
@@ -1759,17 +1535,17 @@ static void * wpa_driver_madwifi_init(vo
|
@@ -1779,17 +1555,17 @@ static void * wpa_driver_madwifi_init(vo
|
||||||
|
|
||||||
drv->ctx = ctx;
|
drv->ctx = ctx;
|
||||||
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
|
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
|
||||||
|
@ -695,7 +704,7 @@
|
||||||
wpa_printf(MSG_DEBUG, "%s: failed to enable WPA support",
|
wpa_printf(MSG_DEBUG, "%s: failed to enable WPA support",
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
goto fail3;
|
goto fail3;
|
||||||
@@ -1778,7 +1554,7 @@ static void * wpa_driver_madwifi_init(vo
|
@@ -1798,7 +1574,7 @@ static void * wpa_driver_madwifi_init(vo
|
||||||
return drv;
|
return drv;
|
||||||
|
|
||||||
fail3:
|
fail3:
|
||||||
|
@ -704,7 +713,7 @@
|
||||||
fail2:
|
fail2:
|
||||||
wpa_driver_wext_deinit(drv->wext);
|
wpa_driver_wext_deinit(drv->wext);
|
||||||
fail:
|
fail:
|
||||||
@@ -1789,38 +1565,37 @@ fail:
|
@@ -1809,38 +1585,37 @@ fail:
|
||||||
|
|
||||||
static void wpa_driver_madwifi_deinit(void *priv)
|
static void wpa_driver_madwifi_deinit(void *priv)
|
||||||
{
|
{
|
||||||
|
@ -750,17 +759,17 @@
|
||||||
#ifdef HOSTAPD
|
#ifdef HOSTAPD
|
||||||
.hapd_init = madwifi_init,
|
.hapd_init = madwifi_init,
|
||||||
.hapd_deinit = madwifi_deinit,
|
.hapd_deinit = madwifi_deinit,
|
||||||
@@ -1840,7 +1615,8 @@ const struct wpa_driver_ops wpa_driver_m
|
@@ -1861,7 +1636,8 @@ const struct wpa_driver_ops wpa_driver_m
|
||||||
.sta_clear_stats = madwifi_sta_clear_stats,
|
|
||||||
.commit = madwifi_commit,
|
.commit = madwifi_commit,
|
||||||
.set_ap_wps_ie = madwifi_set_ap_wps_ie,
|
.set_ap_wps_ie = madwifi_set_ap_wps_ie,
|
||||||
|
.set_freq = madwifi_set_freq,
|
||||||
-#else /* HOSTAPD */
|
-#else /* HOSTAPD */
|
||||||
+#endif /* HOSTAPD */
|
+#endif /* HOSTAPD */
|
||||||
+#if !defined(NO_SUPPLICANT)
|
+#if !defined(NO_SUPPLICANT)
|
||||||
.get_bssid = wpa_driver_madwifi_get_bssid,
|
.get_bssid = wpa_driver_madwifi_get_bssid,
|
||||||
.get_ssid = wpa_driver_madwifi_get_ssid,
|
.get_ssid = wpa_driver_madwifi_get_ssid,
|
||||||
.init = wpa_driver_madwifi_init,
|
.init = wpa_driver_madwifi_init,
|
||||||
@@ -1852,5 +1628,5 @@ const struct wpa_driver_ops wpa_driver_m
|
@@ -1873,5 +1649,5 @@ const struct wpa_driver_ops wpa_driver_m
|
||||||
.disassociate = wpa_driver_madwifi_disassociate,
|
.disassociate = wpa_driver_madwifi_disassociate,
|
||||||
.associate = wpa_driver_madwifi_associate,
|
.associate = wpa_driver_madwifi_associate,
|
||||||
.set_operstate = wpa_driver_madwifi_set_operstate,
|
.set_operstate = wpa_driver_madwifi_set_operstate,
|
||||||
|
|
|
@ -1,29 +1,32 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -1890,6 +1890,7 @@ static void * wpa_driver_nl80211_init(vo
|
@@ -2289,6 +2289,7 @@ static void * wpa_driver_nl80211_init(vo
|
||||||
drv->monitor_ifidx = -1;
|
drv->monitor_ifidx = -1;
|
||||||
drv->monitor_sock = -1;
|
drv->monitor_sock = -1;
|
||||||
drv->ioctl_sock = -1;
|
drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED;
|
||||||
+ drv->nlmode = NL80211_IFTYPE_STATION;
|
+ drv->nlmode = NL80211_IFTYPE_STATION;
|
||||||
|
|
||||||
if (wpa_driver_nl80211_init_nl(drv)) {
|
if (wpa_driver_nl80211_init_nl(drv)) {
|
||||||
os_free(drv);
|
os_free(drv);
|
||||||
@@ -2056,29 +2057,29 @@ wpa_driver_nl80211_finish_drv_init(struc
|
@@ -2446,37 +2447,37 @@ wpa_driver_nl80211_finish_drv_init(struc
|
||||||
drv->ifindex = if_nametoindex(bss->ifname);
|
drv->ifindex = if_nametoindex(bss->ifname);
|
||||||
drv->first_bss.ifindex = drv->ifindex;
|
drv->first_bss.ifindex = drv->ifindex;
|
||||||
|
|
||||||
-#ifndef HOSTAPD
|
-#ifndef HOSTAPD
|
||||||
- if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) {
|
- /*
|
||||||
- wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
|
- * Make sure the interface starts up in station mode unless this is a
|
||||||
|
- * dynamically added interface (e.g., P2P) that was already configured
|
||||||
|
- * with proper iftype.
|
||||||
|
- */
|
||||||
|
- if ((drv->global == NULL ||
|
||||||
|
- drv->ifindex != drv->global->if_add_ifindex) &&
|
||||||
|
- wpa_driver_nl80211_set_mode(bss, NL80211_IFTYPE_STATION) < 0) {
|
||||||
|
- wpa_printf(MSG_ERROR, "nl80211: Could not configure driver to "
|
||||||
- "use managed mode");
|
- "use managed mode");
|
||||||
|
- return -1;
|
||||||
- }
|
- }
|
||||||
+ if (drv->nlmode == NL80211_IFTYPE_STATION) {
|
-
|
||||||
+ if (wpa_driver_nl80211_set_mode(bss, IEEE80211_MODE_INFRA) < 0) {
|
- if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) {
|
||||||
+ wpa_printf(MSG_DEBUG, "nl80211: Could not configure driver to "
|
|
||||||
+ "use managed mode");
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
|
|
||||||
- if (rfkill_is_blocked(drv->rfkill)) {
|
- if (rfkill_is_blocked(drv->rfkill)) {
|
||||||
- wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
|
- wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
|
||||||
- "interface '%s' due to rfkill",
|
- "interface '%s' due to rfkill",
|
||||||
|
@ -33,8 +36,25 @@
|
||||||
- } else {
|
- } else {
|
||||||
- wpa_printf(MSG_ERROR, "nl80211: Could not set "
|
- wpa_printf(MSG_ERROR, "nl80211: Could not set "
|
||||||
- "interface '%s' UP", bss->ifname);
|
- "interface '%s' UP", bss->ifname);
|
||||||
- return -1;
|
+ if (drv->nlmode == NL80211_IFTYPE_STATION) {
|
||||||
+ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
|
+ /*
|
||||||
|
+ * Make sure the interface starts up in station mode unless this is a
|
||||||
|
+ * dynamically added interface (e.g., P2P) that was already configured
|
||||||
|
+ * with proper iftype.
|
||||||
|
+ */
|
||||||
|
+ if ((drv->global == NULL ||
|
||||||
|
+ drv->ifindex != drv->global->if_add_ifindex) &&
|
||||||
|
+ wpa_driver_nl80211_set_mode(bss, NL80211_IFTYPE_STATION) < 0) {
|
||||||
|
+ wpa_printf(MSG_ERROR, "nl80211: Could not configure driver to "
|
||||||
|
+ "use managed mode");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
- netlink_send_oper_ifla(drv->global->netlink, drv->ifindex,
|
||||||
|
- 1, IF_OPER_DORMANT);
|
||||||
|
-#endif /* HOSTAPD */
|
||||||
|
+ if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) {
|
||||||
+ if (rfkill_is_blocked(drv->rfkill)) {
|
+ if (rfkill_is_blocked(drv->rfkill)) {
|
||||||
+ wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
|
+ wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
|
||||||
+ "interface '%s' due to rfkill",
|
+ "interface '%s' due to rfkill",
|
||||||
|
@ -46,35 +66,11 @@
|
||||||
+ "interface '%s' UP", bss->ifname);
|
+ "interface '%s' UP", bss->ifname);
|
||||||
+ return -1;
|
+ return -1;
|
||||||
+ }
|
+ }
|
||||||
}
|
+ }
|
||||||
- }
|
+
|
||||||
|
+ netlink_send_oper_ifla(drv->global->netlink, drv->ifindex,
|
||||||
- netlink_send_oper_ifla(drv->netlink, drv->ifindex,
|
|
||||||
- 1, IF_OPER_DORMANT);
|
|
||||||
-#endif /* HOSTAPD */
|
|
||||||
+ netlink_send_oper_ifla(drv->netlink, drv->ifindex,
|
|
||||||
+ 1, IF_OPER_DORMANT);
|
+ 1, IF_OPER_DORMANT);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
if (wpa_driver_nl80211_capa(drv))
|
if (wpa_driver_nl80211_capa(drv))
|
||||||
return -1;
|
return -1;
|
||||||
@@ -3849,7 +3850,8 @@ static void nl80211_remove_iface(struct
|
|
||||||
|
|
||||||
#ifdef HOSTAPD
|
|
||||||
/* stop listening for EAPOL on this interface */
|
|
||||||
- del_ifidx(drv, ifidx);
|
|
||||||
+ if (drv->nlmode == NL80211_IFTYPE_AP)
|
|
||||||
+ del_ifidx(drv, ifidx);
|
|
||||||
#endif /* HOSTAPD */
|
|
||||||
|
|
||||||
msg = nlmsg_alloc();
|
|
||||||
@@ -3922,7 +3924,8 @@ static int nl80211_create_iface_once(str
|
|
||||||
|
|
||||||
#ifdef HOSTAPD
|
|
||||||
/* start listening for EAPOL on this interface */
|
|
||||||
- add_ifidx(drv, ifidx);
|
|
||||||
+ if (drv->nlmode == NL80211_IFTYPE_AP)
|
|
||||||
+ add_ifidx(drv, ifidx);
|
|
||||||
#endif /* HOSTAPD */
|
|
||||||
|
|
||||||
if (addr && iftype != NL80211_IFTYPE_MONITOR &&
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -475,6 +475,10 @@ static void wpa_driver_nl80211_event_rtm
|
@@ -600,6 +600,10 @@ static void wpa_driver_nl80211_event_rtm
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
wpa_printf(MSG_DEBUG, "RTM_NEWLINK: operstate=%d ifi_flags=0x%x "
|
wpa_printf(MSG_DEBUG, "RTM_NEWLINK: operstate=%d ifi_flags=0x%x "
|
||||||
"(%s%s%s%s)",
|
"(%s%s%s%s)",
|
||||||
drv->operstate, ifi->ifi_flags,
|
drv->operstate, ifi->ifi_flags,
|
||||||
@@ -546,6 +550,10 @@ static void wpa_driver_nl80211_event_rtm
|
@@ -692,6 +696,10 @@ static void wpa_driver_nl80211_event_rtm
|
||||||
attrlen = len;
|
attrlen = len;
|
||||||
attr = (struct rtattr *) buf;
|
attr = (struct rtattr *) buf;
|
||||||
|
|
||||||
|
@ -22,19 +22,19 @@
|
||||||
rta_len = RTA_ALIGN(sizeof(struct rtattr));
|
rta_len = RTA_ALIGN(sizeof(struct rtattr));
|
||||||
while (RTA_OK(attr, attrlen)) {
|
while (RTA_OK(attr, attrlen)) {
|
||||||
if (attr->rta_type == IFLA_IFNAME) {
|
if (attr->rta_type == IFLA_IFNAME) {
|
||||||
@@ -1679,6 +1687,11 @@ static int wpa_driver_nl80211_capa(struc
|
@@ -2291,6 +2299,11 @@ static void * wpa_driver_nl80211_init(vo
|
||||||
drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
|
drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED;
|
||||||
drv->capa.max_remain_on_chan = info.max_remain_on_chan;
|
drv->nlmode = NL80211_IFTYPE_STATION;
|
||||||
|
|
||||||
+#ifdef HOSTAPD
|
+#ifdef HOSTAPD
|
||||||
+ drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
|
+ drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int);
|
||||||
+ drv->if_indices = drv->default_if_indices;
|
+ drv->if_indices = drv->default_if_indices;
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
return 0;
|
if (wpa_driver_nl80211_init_nl(drv)) {
|
||||||
}
|
os_free(drv);
|
||||||
|
return NULL;
|
||||||
@@ -5715,8 +5728,6 @@ static void *i802_init(struct hostapd_da
|
@@ -6531,8 +6544,6 @@ static void *i802_init(struct hostapd_da
|
||||||
br_ifindex = 0;
|
br_ifindex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <net/if_arp.h>
|
#include <net/if_arp.h>
|
||||||
#include <netpacket/packet.h>
|
#include <netpacket/packet.h>
|
||||||
|
|
||||||
@@ -42,10 +39,16 @@
|
@@ -43,10 +40,16 @@
|
||||||
static const u8 rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
|
static const u8 rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
struct hostap_driver_data {
|
struct hostap_driver_data {
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
int ioctl_sock; /* socket for ioctl() use */
|
int ioctl_sock; /* socket for ioctl() use */
|
||||||
struct netlink_data *netlink;
|
struct netlink_data *netlink;
|
||||||
|
|
||||||
@@ -55,9 +58,11 @@ struct hostap_driver_data {
|
@@ -56,9 +59,11 @@ struct hostap_driver_data {
|
||||||
size_t generic_ie_len;
|
size_t generic_ie_len;
|
||||||
u8 *wps_ie;
|
u8 *wps_ie;
|
||||||
size_t wps_ie_len;
|
size_t wps_ie_len;
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
static int hostapd_ioctl(void *priv, struct prism2_hostapd_param *param,
|
static int hostapd_ioctl(void *priv, struct prism2_hostapd_param *param,
|
||||||
int len);
|
int len);
|
||||||
static int hostap_set_iface_flags(void *priv, int dev_up);
|
static int hostap_set_iface_flags(void *priv, int dev_up);
|
||||||
@@ -400,65 +405,6 @@ static int hostapd_ioctl(void *priv, str
|
@@ -399,65 +404,6 @@ static int hostapd_ioctl(void *priv, str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,8 +106,8 @@
|
||||||
static int hostap_get_seqnum(const char *ifname, void *priv, const u8 *addr,
|
static int hostap_get_seqnum(const char *ifname, void *priv, const u8 *addr,
|
||||||
int idx, u8 *seq)
|
int idx, u8 *seq)
|
||||||
{
|
{
|
||||||
@@ -1126,21 +1072,9 @@ static struct hostapd_hw_modes * hostap_
|
@@ -1171,21 +1117,9 @@ static void wpa_driver_hostap_poll_clien
|
||||||
return mode;
|
hostap_send_mlme(priv, (u8 *)&hdr, sizeof(hdr));
|
||||||
}
|
}
|
||||||
|
|
||||||
-#else /* HOSTAPD */
|
-#else /* HOSTAPD */
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
struct prism2_hostapd_param *param,
|
struct prism2_hostapd_param *param,
|
||||||
int len, int show_err)
|
int len, int show_err)
|
||||||
{
|
{
|
||||||
@@ -1162,7 +1096,12 @@ static int hostapd_ioctl(struct wpa_driv
|
@@ -1207,7 +1141,12 @@ static int hostapd_ioctl(struct wpa_driv
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
const u8 *wpa_ie, size_t wpa_ie_len)
|
const u8 *wpa_ie, size_t wpa_ie_len)
|
||||||
{
|
{
|
||||||
struct prism2_hostapd_param *param;
|
struct prism2_hostapd_param *param;
|
||||||
@@ -1178,7 +1117,7 @@ static int wpa_driver_hostap_set_wpa_ie(
|
@@ -1223,7 +1162,7 @@ static int wpa_driver_hostap_set_wpa_ie(
|
||||||
param->cmd = PRISM2_HOSTAPD_SET_GENERIC_ELEMENT;
|
param->cmd = PRISM2_HOSTAPD_SET_GENERIC_ELEMENT;
|
||||||
param->u.generic_elem.len = wpa_ie_len;
|
param->u.generic_elem.len = wpa_ie_len;
|
||||||
os_memcpy(param->u.generic_elem.data, wpa_ie, wpa_ie_len);
|
os_memcpy(param->u.generic_elem.data, wpa_ie, wpa_ie_len);
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
os_free(param);
|
os_free(param);
|
||||||
|
|
||||||
@@ -1186,7 +1125,7 @@ static int wpa_driver_hostap_set_wpa_ie(
|
@@ -1231,7 +1170,7 @@ static int wpa_driver_hostap_set_wpa_ie(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
int value)
|
int value)
|
||||||
{
|
{
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
@@ -1208,7 +1147,7 @@ static int prism2param(struct wpa_driver
|
@@ -1253,7 +1192,7 @@ static int prism2param(struct wpa_driver
|
||||||
|
|
||||||
static int wpa_driver_hostap_set_wpa(void *priv, int enabled)
|
static int wpa_driver_hostap_set_wpa(void *priv, int enabled)
|
||||||
{
|
{
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
|
wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
|
||||||
@@ -1224,125 +1163,15 @@ static int wpa_driver_hostap_set_wpa(voi
|
@@ -1269,125 +1208,15 @@ static int wpa_driver_hostap_set_wpa(voi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@
|
||||||
int type)
|
int type)
|
||||||
{
|
{
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
@@ -1363,7 +1192,7 @@ static int wpa_driver_hostap_reset(struc
|
@@ -1408,7 +1237,7 @@ static int wpa_driver_hostap_reset(struc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
const u8 *addr, int cmd, int reason_code)
|
const u8 *addr, int cmd, int reason_code)
|
||||||
{
|
{
|
||||||
struct prism2_hostapd_param param;
|
struct prism2_hostapd_param param;
|
||||||
@@ -1378,7 +1207,7 @@ static int wpa_driver_hostap_mlme(struct
|
@@ -1423,7 +1252,7 @@ static int wpa_driver_hostap_mlme(struct
|
||||||
os_memcpy(param.sta_addr, addr, ETH_ALEN);
|
os_memcpy(param.sta_addr, addr, ETH_ALEN);
|
||||||
param.u.mlme.cmd = cmd;
|
param.u.mlme.cmd = cmd;
|
||||||
param.u.mlme.reason_code = reason_code;
|
param.u.mlme.reason_code = reason_code;
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
os_sleep(0, 100000);
|
os_sleep(0, 100000);
|
||||||
ret = wpa_driver_hostap_reset(drv, 2);
|
ret = wpa_driver_hostap_reset(drv, 2);
|
||||||
@@ -1390,7 +1219,7 @@ static int wpa_driver_hostap_mlme(struct
|
@@ -1435,7 +1264,7 @@ static int wpa_driver_hostap_mlme(struct
|
||||||
static int wpa_driver_hostap_deauthenticate(void *priv, const u8 *addr,
|
static int wpa_driver_hostap_deauthenticate(void *priv, const u8 *addr,
|
||||||
int reason_code)
|
int reason_code)
|
||||||
{
|
{
|
||||||
|
@ -326,7 +326,7 @@
|
||||||
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
|
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
|
||||||
return wpa_driver_hostap_mlme(drv, addr, MLME_STA_DEAUTH,
|
return wpa_driver_hostap_mlme(drv, addr, MLME_STA_DEAUTH,
|
||||||
reason_code);
|
reason_code);
|
||||||
@@ -1400,7 +1229,7 @@ static int wpa_driver_hostap_deauthentic
|
@@ -1445,7 +1274,7 @@ static int wpa_driver_hostap_deauthentic
|
||||||
static int wpa_driver_hostap_disassociate(void *priv, const u8 *addr,
|
static int wpa_driver_hostap_disassociate(void *priv, const u8 *addr,
|
||||||
int reason_code)
|
int reason_code)
|
||||||
{
|
{
|
||||||
|
@ -335,7 +335,7 @@
|
||||||
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
|
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
|
||||||
return wpa_driver_hostap_mlme(drv, addr, MLME_STA_DISASSOC,
|
return wpa_driver_hostap_mlme(drv, addr, MLME_STA_DISASSOC,
|
||||||
reason_code);
|
reason_code);
|
||||||
@@ -1411,7 +1240,7 @@ static int
|
@@ -1456,7 +1285,7 @@ static int
|
||||||
wpa_driver_hostap_associate(void *priv,
|
wpa_driver_hostap_associate(void *priv,
|
||||||
struct wpa_driver_associate_params *params)
|
struct wpa_driver_associate_params *params)
|
||||||
{
|
{
|
||||||
|
@ -344,7 +344,7 @@
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int allow_unencrypted_eapol;
|
int allow_unencrypted_eapol;
|
||||||
|
|
||||||
@@ -1475,7 +1304,7 @@ wpa_driver_hostap_associate(void *priv,
|
@@ -1520,7 +1349,7 @@ wpa_driver_hostap_associate(void *priv,
|
||||||
static int wpa_driver_hostap_scan(void *priv,
|
static int wpa_driver_hostap_scan(void *priv,
|
||||||
struct wpa_driver_scan_params *params)
|
struct wpa_driver_scan_params *params)
|
||||||
{
|
{
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
struct prism2_hostapd_param param;
|
struct prism2_hostapd_param param;
|
||||||
int ret;
|
int ret;
|
||||||
const u8 *ssid = params->ssids[0].ssid;
|
const u8 *ssid = params->ssids[0].ssid;
|
||||||
@@ -1496,7 +1325,7 @@ static int wpa_driver_hostap_scan(void *
|
@@ -1541,7 +1370,7 @@ static int wpa_driver_hostap_scan(void *
|
||||||
param.cmd = PRISM2_HOSTAPD_SCAN_REQ;
|
param.cmd = PRISM2_HOSTAPD_SCAN_REQ;
|
||||||
param.u.scan_req.ssid_len = ssid_len;
|
param.u.scan_req.ssid_len = ssid_len;
|
||||||
os_memcpy(param.u.scan_req.ssid, ssid, ssid_len);
|
os_memcpy(param.u.scan_req.ssid, ssid, ssid_len);
|
||||||
|
@ -362,7 +362,7 @@
|
||||||
|
|
||||||
/* Not all drivers generate "scan completed" wireless event, so try to
|
/* Not all drivers generate "scan completed" wireless event, so try to
|
||||||
* read results after a timeout. */
|
* read results after a timeout. */
|
||||||
@@ -1511,7 +1340,7 @@ static int wpa_driver_hostap_scan(void *
|
@@ -1556,7 +1385,7 @@ static int wpa_driver_hostap_scan(void *
|
||||||
|
|
||||||
static int wpa_driver_hostap_set_auth_alg(void *priv, int auth_alg)
|
static int wpa_driver_hostap_set_auth_alg(void *priv, int auth_alg)
|
||||||
{
|
{
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
int algs = 0;
|
int algs = 0;
|
||||||
|
|
||||||
if (auth_alg & WPA_AUTH_ALG_OPEN)
|
if (auth_alg & WPA_AUTH_ALG_OPEN)
|
||||||
@@ -1529,35 +1358,35 @@ static int wpa_driver_hostap_set_auth_al
|
@@ -1574,35 +1403,35 @@ static int wpa_driver_hostap_set_auth_al
|
||||||
|
|
||||||
static int wpa_driver_hostap_get_bssid(void *priv, u8 *bssid)
|
static int wpa_driver_hostap_get_bssid(void *priv, u8 *bssid)
|
||||||
{
|
{
|
||||||
|
@ -412,7 +412,7 @@
|
||||||
|
|
||||||
drv = os_zalloc(sizeof(*drv));
|
drv = os_zalloc(sizeof(*drv));
|
||||||
if (drv == NULL)
|
if (drv == NULL)
|
||||||
@@ -1597,14 +1426,120 @@ static void * wpa_driver_hostap_init(voi
|
@@ -1642,14 +1471,120 @@ static void * wpa_driver_hostap_init(voi
|
||||||
|
|
||||||
static void wpa_driver_hostap_deinit(void *priv)
|
static void wpa_driver_hostap_deinit(void *priv)
|
||||||
{
|
{
|
||||||
|
@ -535,17 +535,17 @@
|
||||||
|
|
||||||
|
|
||||||
const struct wpa_driver_ops wpa_driver_hostap_ops = {
|
const struct wpa_driver_ops wpa_driver_hostap_ops = {
|
||||||
@@ -1632,7 +1567,8 @@ const struct wpa_driver_ops wpa_driver_h
|
@@ -1679,7 +1614,8 @@ const struct wpa_driver_ops wpa_driver_h
|
||||||
.sta_clear_stats = hostap_sta_clear_stats,
|
|
||||||
.get_hw_feature_data = hostap_get_hw_feature_data,
|
|
||||||
.set_ap_wps_ie = hostap_set_ap_wps_ie,
|
.set_ap_wps_ie = hostap_set_ap_wps_ie,
|
||||||
|
.set_freq = hostap_set_freq,
|
||||||
|
.poll_client = wpa_driver_hostap_poll_client,
|
||||||
-#else /* HOSTAPD */
|
-#else /* HOSTAPD */
|
||||||
+#endif /* HOSTAPD */
|
+#endif /* HOSTAPD */
|
||||||
+#if !defined(NO_SUPPLICANT)
|
+#if !defined(NO_SUPPLICANT)
|
||||||
.get_bssid = wpa_driver_hostap_get_bssid,
|
.get_bssid = wpa_driver_hostap_get_bssid,
|
||||||
.get_ssid = wpa_driver_hostap_get_ssid,
|
.get_ssid = wpa_driver_hostap_get_ssid,
|
||||||
.set_countermeasures = wpa_driver_hostap_set_countermeasures,
|
.set_countermeasures = wpa_driver_hostap_set_countermeasures,
|
||||||
@@ -1644,5 +1580,5 @@ const struct wpa_driver_ops wpa_driver_h
|
@@ -1691,5 +1627,5 @@ const struct wpa_driver_ops wpa_driver_h
|
||||||
.init = wpa_driver_hostap_init,
|
.init = wpa_driver_hostap_init,
|
||||||
.deinit = wpa_driver_hostap_deinit,
|
.deinit = wpa_driver_hostap_deinit,
|
||||||
.set_operstate = wpa_driver_hostap_set_operstate,
|
.set_operstate = wpa_driver_hostap_set_operstate,
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
--- a/wpa_supplicant/ctrl_iface.c
|
||||||
|
+++ b/wpa_supplicant/ctrl_iface.c
|
||||||
|
@@ -685,6 +685,7 @@ static int wpa_supplicant_ctrl_iface_ibs
|
||||||
|
#endif /* CONFIG_IBSS_RSN */
|
||||||
|
|
||||||
|
|
||||||
|
+#ifdef IEEE8021X_EAPOL
|
||||||
|
int wpa_supplicant_ctrl_iface_ctrl_rsp_handle(struct wpa_supplicant *wpa_s,
|
||||||
|
struct wpa_ssid *ssid,
|
||||||
|
const char *field,
|
||||||
|
@@ -750,6 +751,7 @@ int wpa_supplicant_ctrl_iface_ctrl_rsp_h
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
|
||||||
|
static int wpa_supplicant_ctrl_iface_ctrl_rsp(struct wpa_supplicant *wpa_s,
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/hostapd.h
|
--- a/src/ap/hostapd.h
|
||||||
+++ b/src/ap/hostapd.h
|
+++ b/src/ap/hostapd.h
|
||||||
@@ -229,6 +229,7 @@ struct hostapd_iface {
|
@@ -235,6 +235,7 @@ struct hostapd_iface {
|
||||||
int (*for_each_interface)(struct hapd_interfaces *interfaces,
|
int (*for_each_interface)(struct hapd_interfaces *interfaces,
|
||||||
int (*cb)(struct hostapd_iface *iface,
|
int (*cb)(struct hostapd_iface *iface,
|
||||||
void *ctx), void *ctx);
|
void *ctx), void *ctx);
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
/* hostapd.c */
|
/* hostapd.c */
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -807,6 +807,9 @@ int hostapd_setup_interface_complete(str
|
@@ -804,6 +804,9 @@ int hostapd_setup_interface_complete(str
|
||||||
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
|
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
|
||||||
iface->bss[0]->conf->iface);
|
iface->bss[0]->conf->iface);
|
||||||
|
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
+static int daemonize = 0;
|
+static int daemonize = 0;
|
||||||
+static char *pid_file = NULL;
|
+static char *pid_file = NULL;
|
||||||
|
|
||||||
|
extern struct wpa_driver_ops *wpa_drivers[];
|
||||||
|
|
||||||
struct hapd_interfaces {
|
@@ -173,6 +175,16 @@ static void hostapd_logger_cb(void *ctx,
|
||||||
@@ -163,6 +165,16 @@ static void hostapd_logger_cb(void *ctx,
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
|
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hostapd_init - Allocate and initialize per-interface data
|
* hostapd_init - Allocate and initialize per-interface data
|
||||||
@@ -184,6 +196,7 @@ static struct hostapd_iface * hostapd_in
|
@@ -194,6 +206,7 @@ static struct hostapd_iface * hostapd_in
|
||||||
if (hapd_iface == NULL)
|
if (hapd_iface == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@ -56,16 +56,16 @@
|
||||||
hapd_iface->reload_config = hostapd_reload_config;
|
hapd_iface->reload_config = hostapd_reload_config;
|
||||||
hapd_iface->config_read_cb = hostapd_config_read;
|
hapd_iface->config_read_cb = hostapd_config_read;
|
||||||
hapd_iface->config_fname = os_strdup(config_file);
|
hapd_iface->config_fname = os_strdup(config_file);
|
||||||
@@ -399,7 +412,7 @@ static int hostapd_global_init(struct ha
|
@@ -442,7 +455,7 @@ static int hostapd_global_init(struct ha
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-static void hostapd_global_deinit(const char *pid_file)
|
-static void hostapd_global_deinit(const char *pid_file)
|
||||||
+static void hostapd_global_deinit(void)
|
+static void hostapd_global_deinit(void)
|
||||||
{
|
{
|
||||||
#ifdef EAP_SERVER_TNC
|
int i;
|
||||||
tncs_global_deinit();
|
|
||||||
@@ -419,8 +432,7 @@ static void hostapd_global_deinit(const
|
@@ -472,8 +485,7 @@ static void hostapd_global_deinit(const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
{
|
{
|
||||||
#ifdef EAP_SERVER_TNC
|
#ifdef EAP_SERVER_TNC
|
||||||
int tnc = 0;
|
int tnc = 0;
|
||||||
@@ -441,11 +453,6 @@ static int hostapd_global_run(struct hap
|
@@ -494,11 +506,6 @@ static int hostapd_global_run(struct hap
|
||||||
}
|
}
|
||||||
#endif /* EAP_SERVER_TNC */
|
#endif /* EAP_SERVER_TNC */
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
eloop_run();
|
eloop_run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -501,8 +508,7 @@ int main(int argc, char *argv[])
|
@@ -555,8 +562,7 @@ int main(int argc, char *argv[])
|
||||||
struct hapd_interfaces interfaces;
|
struct hapd_interfaces interfaces;
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -95,9 +95,9 @@
|
||||||
- char *pid_file = NULL;
|
- char *pid_file = NULL;
|
||||||
+ int c, debug = 0;
|
+ int c, debug = 0;
|
||||||
const char *log_file = NULL;
|
const char *log_file = NULL;
|
||||||
|
const char *entropy_file = NULL;
|
||||||
|
|
||||||
if (os_program_init())
|
@@ -634,7 +640,7 @@ int main(int argc, char *argv[])
|
||||||
@@ -576,7 +582,7 @@ int main(int argc, char *argv[])
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@@ -587,7 +593,7 @@ int main(int argc, char *argv[])
|
@@ -645,7 +651,7 @@ int main(int argc, char *argv[])
|
||||||
hostapd_interface_deinit_free(interfaces.iface[i]);
|
hostapd_interface_deinit_free(interfaces.iface[i]);
|
||||||
os_free(interfaces.iface);
|
os_free(interfaces.iface);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
if (log_file)
|
if (log_file)
|
||||||
--- a/hostapd/config_file.c
|
--- a/hostapd/config_file.c
|
||||||
+++ b/hostapd/config_file.c
|
+++ b/hostapd/config_file.c
|
||||||
@@ -1891,6 +1891,8 @@ struct hostapd_config * hostapd_config_r
|
@@ -1925,6 +1925,8 @@ struct hostapd_config * hostapd_config_r
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
#ifdef CONFIG_IEEE80211N
|
#ifdef CONFIG_IEEE80211N
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
||||||
--- a/src/ap/ap_config.h
|
--- a/src/ap/ap_config.h
|
||||||
+++ b/src/ap/ap_config.h
|
+++ b/src/ap/ap_config.h
|
||||||
@@ -390,6 +390,7 @@ struct hostapd_config {
|
@@ -412,6 +412,7 @@ struct hostapd_config {
|
||||||
|
|
||||||
int ht_op_mode_fixed;
|
int ht_op_mode_fixed;
|
||||||
u16 ht_capab;
|
u16 ht_capab;
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
int require_ht;
|
int require_ht;
|
||||||
--- a/src/ap/hw_features.c
|
--- a/src/ap/hw_features.c
|
||||||
+++ b/src/ap/hw_features.c
|
+++ b/src/ap/hw_features.c
|
||||||
@@ -463,7 +463,7 @@ static int ieee80211n_check_40mhz(struct
|
@@ -449,7 +449,7 @@ static int ieee80211n_check_40mhz(struct
|
||||||
{
|
{
|
||||||
struct wpa_driver_scan_params params;
|
struct wpa_driver_scan_params params;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
ifndef CONFIG_OS
|
ifndef CONFIG_OS
|
||||||
ifdef CONFIG_NATIVE_WINDOWS
|
ifdef CONFIG_NATIVE_WINDOWS
|
||||||
@@ -159,10 +160,14 @@ ifdef CONFIG_IEEE80211N
|
@@ -168,10 +169,14 @@ ifdef CONFIG_IEEE80211N
|
||||||
CFLAGS += -DCONFIG_IEEE80211N
|
CFLAGS += -DCONFIG_IEEE80211N
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
LIBS += $(DRV_AP_LIBS)
|
LIBS += $(DRV_AP_LIBS)
|
||||||
|
|
||||||
ifdef CONFIG_L2_PACKET
|
ifdef CONFIG_L2_PACKET
|
||||||
@@ -780,6 +785,12 @@ install: all
|
@@ -799,6 +804,12 @@ install: all
|
||||||
|
|
||||||
BCHECK=../src/drivers/build.hostapd
|
BCHECK=../src/drivers/build.hostapd
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
hostapd: $(BCHECK) $(OBJS)
|
hostapd: $(BCHECK) $(OBJS)
|
||||||
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
@@ -820,6 +831,12 @@ HOBJS += ../src/crypto/aes-internal.o
|
@@ -837,6 +848,12 @@ HOBJS += ../src/crypto/aes-internal.o
|
||||||
HOBJS += ../src/crypto/aes-internal-enc.o
|
HOBJS += ../src/crypto/aes-internal-enc.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -54,15 +54,15 @@
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
--- a/wpa_supplicant/Makefile
|
--- a/wpa_supplicant/Makefile
|
||||||
+++ b/wpa_supplicant/Makefile
|
+++ b/wpa_supplicant/Makefile
|
||||||
@@ -53,6 +53,7 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr
|
@@ -14,6 +14,7 @@ CFLAGS += -I../src
|
||||||
OBJS_c += ../src/utils/wpa_debug.o
|
CFLAGS += -I../src/utils
|
||||||
|
|
||||||
-include .config
|
-include .config
|
||||||
+-include $(if $(MULTICALL),../hostapd/.config)
|
+-include $(if $(MULTICALL),../hostapd/.config)
|
||||||
|
|
||||||
ifndef CONFIG_OS
|
ALL=wpa_supplicant wpa_cli
|
||||||
ifdef CONFIG_NATIVE_WINDOWS
|
|
||||||
@@ -634,6 +635,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
@@ -663,6 +664,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||||
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
|
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
|
||||||
LIBS += -ldl -rdynamic
|
LIBS += -ldl -rdynamic
|
||||||
endif
|
endif
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_AP
|
ifdef CONFIG_AP
|
||||||
@@ -642,9 +647,11 @@ NEED_EAP_COMMON=y
|
@@ -671,9 +676,11 @@ NEED_EAP_COMMON=y
|
||||||
NEED_RSN_AUTHENTICATOR=y
|
NEED_RSN_AUTHENTICATOR=y
|
||||||
CFLAGS += -DCONFIG_AP
|
CFLAGS += -DCONFIG_AP
|
||||||
OBJS += ap.o
|
OBJS += ap.o
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
OBJS += ../src/ap/hostapd.o
|
OBJS += ../src/ap/hostapd.o
|
||||||
OBJS += ../src/ap/wpa_auth_glue.o
|
OBJS += ../src/ap/wpa_auth_glue.o
|
||||||
OBJS += ../src/ap/utils.o
|
OBJS += ../src/ap/utils.o
|
||||||
@@ -688,10 +695,18 @@ CFLAGS += -DEAP_SERVER_WSC
|
@@ -718,10 +725,18 @@ CFLAGS += -DEAP_SERVER_WSC
|
||||||
OBJS += ../src/ap/wps_hostapd.o
|
OBJS += ../src/ap/wps_hostapd.o
|
||||||
OBJS += ../src/eap_server/eap_server_wsc.o
|
OBJS += ../src/eap_server/eap_server_wsc.o
|
||||||
endif
|
endif
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
NEED_AES_WRAP=y
|
NEED_AES_WRAP=y
|
||||||
OBJS += ../src/ap/wpa_auth.o
|
OBJS += ../src/ap/wpa_auth.o
|
||||||
OBJS += ../src/ap/wpa_auth_ie.o
|
OBJS += ../src/ap/wpa_auth_ie.o
|
||||||
@@ -1352,6 +1367,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
@@ -1397,6 +1412,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
@ -117,9 +117,9 @@
|
||||||
wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
|
wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
@@ -1412,6 +1433,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2.
|
@@ -1460,6 +1481,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2.
|
||||||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
%.service: %.service.in
|
||||||
@$(E) " CC " $<
|
sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
||||||
|
|
||||||
+dump_cflags:
|
+dump_cflags:
|
||||||
+ @echo -n $(CFLAGS) " "
|
+ @echo -n $(CFLAGS) " "
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
wpa_cli.exe: wpa_cli
|
wpa_cli.exe: wpa_cli
|
||||||
--- a/src/drivers/driver.h
|
--- a/src/drivers/driver.h
|
||||||
+++ b/src/drivers/driver.h
|
+++ b/src/drivers/driver.h
|
||||||
@@ -3199,8 +3199,8 @@ union wpa_event_data {
|
@@ -3452,8 +3452,8 @@ union wpa_event_data {
|
||||||
* Driver wrapper code should call this function whenever an event is received
|
* Driver wrapper code should call this function whenever an event is received
|
||||||
* from the driver.
|
* from the driver.
|
||||||
*/
|
*/
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
/*
|
/*
|
||||||
--- a/src/ap/drv_callbacks.c
|
--- a/src/ap/drv_callbacks.c
|
||||||
+++ b/src/ap/drv_callbacks.c
|
+++ b/src/ap/drv_callbacks.c
|
||||||
@@ -448,8 +448,8 @@ static void hostapd_event_eapol_rx(struc
|
@@ -467,8 +467,8 @@ static void hostapd_event_eapol_rx(struc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,9 +162,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-void wpa_supplicant_event(void *ctx, wpa_event_type event,
|
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||||
- union wpa_event_data *data)
|
- union wpa_event_data *data)
|
||||||
+static void supplicant_event(void *ctx, wpa_event_type event,
|
+static void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||||
+ union wpa_event_data *data)
|
+ union wpa_event_data *data)
|
||||||
{
|
{
|
||||||
struct wpa_priv_interface *iface = ctx;
|
struct wpa_priv_interface *iface = ctx;
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
for (;;) {
|
for (;;) {
|
||||||
--- a/wpa_supplicant/events.c
|
--- a/wpa_supplicant/events.c
|
||||||
+++ b/wpa_supplicant/events.c
|
+++ b/wpa_supplicant/events.c
|
||||||
@@ -1746,8 +1746,8 @@ static void wpa_supplicant_event_unprot_
|
@@ -1936,8 +1936,8 @@ static void wnm_action_rx(struct wpa_sup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
u16 reason_code = 0;
|
u16 reason_code = 0;
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -2314,6 +2314,9 @@ static void wpa_supplicant_deinit_iface(
|
@@ -2412,6 +2412,9 @@ static void wpa_supplicant_deinit_iface(
|
||||||
wpa_drv_deinit(wpa_s);
|
wpa_drv_deinit(wpa_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpa_supplicant_add_iface - Add a new network interface
|
* wpa_supplicant_add_iface - Add a new network interface
|
||||||
@@ -2497,6 +2500,7 @@ struct wpa_global * wpa_supplicant_init(
|
@@ -2602,6 +2605,7 @@ struct wpa_global * wpa_supplicant_init(
|
||||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||||
#endif /* CONFIG_NO_WPA_MSG */
|
#endif /* CONFIG_NO_WPA_MSG */
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
wpa_debug_open_syslog();
|
wpa_debug_open_syslog();
|
||||||
--- a/hostapd/main.c
|
--- a/hostapd/main.c
|
||||||
+++ b/hostapd/main.c
|
+++ b/hostapd/main.c
|
||||||
@@ -502,6 +502,9 @@ static const char * hostapd_msg_ifname_c
|
@@ -556,6 +556,9 @@ static const char * hostapd_msg_ifname_c
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,13 +222,13 @@
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -514,6 +517,7 @@ int main(int argc, char *argv[])
|
@@ -569,6 +572,7 @@ int main(int argc, char *argv[])
|
||||||
if (os_program_init())
|
if (os_program_init())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
+ wpa_supplicant_event = hostapd_wpa_event;
|
+ wpa_supplicant_event = hostapd_wpa_event;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
c = getopt(argc, argv, "Bdf:hKP:tv");
|
c = getopt(argc, argv, "Bde:f:hKP:tv");
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
--- a/src/drivers/drivers.c
|
--- a/src/drivers/drivers.c
|
||||||
+++ b/src/drivers/drivers.c
|
+++ b/src/drivers/drivers.c
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
--- a/src/tls/x509v3.c
|
--- a/src/tls/x509v3.c
|
||||||
+++ b/src/tls/x509v3.c
|
+++ b/src/tls/x509v3.c
|
||||||
@@ -1854,8 +1854,11 @@ int x509_certificate_chain_validate(stru
|
@@ -1854,6 +1854,9 @@ int x509_certificate_chain_validate(stru
|
||||||
if (chain_trusted)
|
if (chain_trusted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
- if ((unsigned long) now.sec <
|
+#ifdef NO_TIMESTAMP_CHECK
|
||||||
+ if (
|
+ disable_time_checks = 1;
|
||||||
+#ifndef NO_TIMESTAMP_CHECK
|
|
||||||
+ (unsigned long) now.sec <
|
|
||||||
(unsigned long) cert->not_before ||
|
|
||||||
+#endif
|
+#endif
|
||||||
(unsigned long) now.sec >
|
if (!disable_time_checks &&
|
||||||
(unsigned long) cert->not_after) {
|
((unsigned long) now.sec <
|
||||||
wpa_printf(MSG_INFO, "X509: Certificate not valid "
|
(unsigned long) cert->not_before ||
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -2070,7 +2070,7 @@ static struct wpa_supplicant * wpa_suppl
|
@@ -2157,7 +2157,7 @@ static struct wpa_supplicant * wpa_suppl
|
||||||
if (wpa_s == NULL)
|
if (wpa_s == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
wpa_s->scan_req = 1;
|
wpa_s->scan_req = 1;
|
||||||
|
@ -8,4 +8,4 @@
|
||||||
+ wpa_s->scan_interval = 1;
|
+ wpa_s->scan_interval = 1;
|
||||||
wpa_s->new_connection = 1;
|
wpa_s->new_connection = 1;
|
||||||
wpa_s->parent = wpa_s;
|
wpa_s->parent = wpa_s;
|
||||||
|
wpa_s->sched_scanning = 0;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -129,7 +129,9 @@ struct wpa_driver_nl80211_data {
|
@@ -198,7 +198,9 @@ struct wpa_driver_nl80211_data {
|
||||||
int ifindex;
|
|
||||||
int if_removed;
|
int if_removed;
|
||||||
int if_disabled;
|
int if_disabled;
|
||||||
|
int ignore_if_down_event;
|
||||||
+#ifdef CONFIG_RFKILL
|
+#ifdef CONFIG_RFKILL
|
||||||
struct rfkill_data *rfkill;
|
struct rfkill_data *rfkill;
|
||||||
+#endif
|
+#endif
|
||||||
struct wpa_driver_capa capa;
|
struct wpa_driver_capa capa;
|
||||||
int has_capability;
|
int has_capability;
|
||||||
|
|
||||||
@@ -1819,7 +1821,7 @@ err1:
|
@@ -2203,7 +2205,7 @@ err3:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
static void wpa_driver_nl80211_rfkill_blocked(void *ctx)
|
static void wpa_driver_nl80211_rfkill_blocked(void *ctx)
|
||||||
{
|
{
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked");
|
wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked");
|
||||||
@@ -1841,6 +1843,7 @@ static void wpa_driver_nl80211_rfkill_un
|
@@ -2226,6 +2228,7 @@ static void wpa_driver_nl80211_rfkill_un
|
||||||
}
|
}
|
||||||
/* rtnetlink ifup handler will report interface as enabled */
|
/* rtnetlink ifup handler will report interface as enabled */
|
||||||
}
|
}
|
||||||
|
@ -27,25 +27,25 @@
|
||||||
|
|
||||||
|
|
||||||
static void nl80211_get_phy_name(struct wpa_driver_nl80211_data *drv)
|
static void nl80211_get_phy_name(struct wpa_driver_nl80211_data *drv)
|
||||||
@@ -1889,7 +1892,9 @@ static void * wpa_driver_nl80211_init(vo
|
@@ -2283,7 +2286,9 @@ static void * wpa_driver_nl80211_init(vo
|
||||||
|
void *global_priv)
|
||||||
{
|
{
|
||||||
struct wpa_driver_nl80211_data *drv;
|
struct wpa_driver_nl80211_data *drv;
|
||||||
struct netlink_config *cfg;
|
|
||||||
+#ifdef CONFIG_RFKILL
|
+#ifdef CONFIG_RFKILL
|
||||||
struct rfkill_config *rcfg;
|
struct rfkill_config *rcfg;
|
||||||
+#endif
|
+#endif
|
||||||
struct i802_bss *bss;
|
struct i802_bss *bss;
|
||||||
|
|
||||||
drv = os_zalloc(sizeof(*drv));
|
drv = os_zalloc(sizeof(*drv));
|
||||||
@@ -1930,6 +1935,7 @@ static void * wpa_driver_nl80211_init(vo
|
@@ -2311,6 +2316,7 @@ static void * wpa_driver_nl80211_init(vo
|
||||||
goto failed;
|
|
||||||
}
|
nl80211_get_phy_name(drv);
|
||||||
|
|
||||||
+#ifdef CONFIG_RFKILL
|
+#ifdef CONFIG_RFKILL
|
||||||
rcfg = os_zalloc(sizeof(*rcfg));
|
rcfg = os_zalloc(sizeof(*rcfg));
|
||||||
if (rcfg == NULL)
|
if (rcfg == NULL)
|
||||||
goto failed;
|
goto failed;
|
||||||
@@ -1942,6 +1948,7 @@ static void * wpa_driver_nl80211_init(vo
|
@@ -2323,6 +2329,7 @@ static void * wpa_driver_nl80211_init(vo
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: RFKILL status not available");
|
wpa_printf(MSG_DEBUG, "nl80211: RFKILL status not available");
|
||||||
os_free(rcfg);
|
os_free(rcfg);
|
||||||
}
|
}
|
||||||
|
@ -53,17 +53,7 @@
|
||||||
|
|
||||||
if (wpa_driver_nl80211_finish_drv_init(drv))
|
if (wpa_driver_nl80211_finish_drv_init(drv))
|
||||||
goto failed;
|
goto failed;
|
||||||
@@ -1952,7 +1959,9 @@ static void * wpa_driver_nl80211_init(vo
|
@@ -2445,10 +2452,12 @@ static int nl80211_register_action_frame
|
||||||
return bss;
|
|
||||||
|
|
||||||
failed:
|
|
||||||
+#ifdef CONFIG_RFKILL
|
|
||||||
rfkill_deinit(drv->rfkill);
|
|
||||||
+#endif
|
|
||||||
netlink_deinit(drv->netlink);
|
|
||||||
if (drv->ioctl_sock >= 0)
|
|
||||||
close(drv->ioctl_sock);
|
|
||||||
@@ -2055,10 +2064,12 @@ static int nl80211_register_action_frame
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,10 +66,10 @@
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -2077,13 +2088,16 @@ wpa_driver_nl80211_finish_drv_init(struc
|
@@ -2475,13 +2484,16 @@ wpa_driver_nl80211_finish_drv_init(struc
|
||||||
}
|
}
|
||||||
|
|
||||||
if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1)) {
|
if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) {
|
||||||
+#ifdef CONFIG_RFKILL
|
+#ifdef CONFIG_RFKILL
|
||||||
if (rfkill_is_blocked(drv->rfkill)) {
|
if (rfkill_is_blocked(drv->rfkill)) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
|
wpa_printf(MSG_DEBUG, "nl80211: Could not yet enable "
|
||||||
|
@ -94,7 +84,7 @@
|
||||||
wpa_printf(MSG_ERROR, "nl80211: Could not set "
|
wpa_printf(MSG_ERROR, "nl80211: Could not set "
|
||||||
"interface '%s' UP", bss->ifname);
|
"interface '%s' UP", bss->ifname);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -2111,8 +2125,10 @@ wpa_driver_nl80211_finish_drv_init(struc
|
@@ -2510,8 +2522,10 @@ wpa_driver_nl80211_finish_drv_init(struc
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send_rfkill_event) {
|
if (send_rfkill_event) {
|
||||||
|
@ -105,26 +95,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -2193,7 +2209,9 @@ static void wpa_driver_nl80211_deinit(vo
|
@@ -2596,7 +2610,9 @@ static void wpa_driver_nl80211_deinit(vo
|
||||||
|
|
||||||
netlink_send_oper_ifla(drv->netlink, drv->ifindex, 0, IF_OPER_UP);
|
netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 0,
|
||||||
netlink_deinit(drv->netlink);
|
IF_OPER_UP);
|
||||||
+#ifdef CONFIG_RFKILL
|
+#ifdef CONFIG_RFKILL
|
||||||
rfkill_deinit(drv->rfkill);
|
rfkill_deinit(drv->rfkill);
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
|
eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
|
||||||
|
|
||||||
@@ -5785,7 +5803,9 @@ static void *i802_init(struct hostapd_da
|
|
||||||
|
|
||||||
failed:
|
|
||||||
nl80211_remove_monitor_interface(drv);
|
|
||||||
+#ifdef CONFIG_RFKILL
|
|
||||||
rfkill_deinit(drv->rfkill);
|
|
||||||
+#endif
|
|
||||||
netlink_deinit(drv->netlink);
|
|
||||||
if (drv->ioctl_sock >= 0)
|
|
||||||
close(drv->ioctl_sock);
|
|
||||||
--- a/src/drivers/driver_wext.c
|
--- a/src/drivers/driver_wext.c
|
||||||
+++ b/src/drivers/driver_wext.c
|
+++ b/src/drivers/driver_wext.c
|
||||||
@@ -702,7 +702,7 @@ static void wpa_driver_wext_event_rtm_de
|
@@ -702,7 +702,7 @@ static void wpa_driver_wext_event_rtm_de
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -120,6 +120,10 @@ int hostapd_reload_config(struct hostapd
|
@@ -124,6 +124,10 @@ int hostapd_reload_config(struct hostapd
|
||||||
oldconf = hapd->iconf;
|
oldconf = hapd->iconf;
|
||||||
iface->conf = newconf;
|
iface->conf = newconf;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -2135,23 +2135,43 @@ wpa_driver_nl80211_finish_drv_init(struc
|
@@ -2532,22 +2532,41 @@ wpa_driver_nl80211_finish_drv_init(struc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,13 +11,11 @@
|
||||||
struct nl_msg *msg;
|
struct nl_msg *msg;
|
||||||
|
|
||||||
+ bss->beacon_set = 0;
|
+ bss->beacon_set = 0;
|
||||||
+
|
|
||||||
msg = nlmsg_alloc();
|
msg = nlmsg_alloc();
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
|
nl80211_cmd(drv, msg, 0, NL80211_CMD_DEL_BEACON);
|
||||||
0, NL80211_CMD_DEL_BEACON, 0);
|
|
||||||
- NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
|
- NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
|
||||||
+ NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
|
+ NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
|
||||||
|
|
||||||
|
@ -46,18 +44,18 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
|
* wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface
|
||||||
@@ -6658,4 +6678,5 @@ const struct wpa_driver_ops wpa_driver_n
|
@@ -7654,4 +7673,5 @@ const struct wpa_driver_ops wpa_driver_n
|
||||||
.set_intra_bss = nl80211_set_intra_bss,
|
.send_tdls_mgmt = nl80211_send_tdls_mgmt,
|
||||||
.set_param = nl80211_set_param,
|
.tdls_oper = nl80211_tdls_oper,
|
||||||
.get_radio_name = nl80211_get_radio_name,
|
#endif /* CONFIG_TDLS */
|
||||||
+ .stop_ap = wpa_driver_nl80211_stop_ap,
|
+ .stop_ap = wpa_driver_nl80211_stop_ap,
|
||||||
};
|
};
|
||||||
--- a/src/drivers/driver.h
|
--- a/src/drivers/driver.h
|
||||||
+++ b/src/drivers/driver.h
|
+++ b/src/drivers/driver.h
|
||||||
@@ -2253,6 +2253,8 @@ struct wpa_driver_ops {
|
@@ -2452,6 +2452,8 @@ struct wpa_driver_ops {
|
||||||
* implementation, there is no need to implement this function.
|
|
||||||
*/
|
*/
|
||||||
int (*set_authmode)(void *priv, int authmode);
|
void (*poll_client)(void *priv, const u8 *own_addr,
|
||||||
|
const u8 *addr, int qos);
|
||||||
+
|
+
|
||||||
+ int (*stop_ap)(void *priv);
|
+ int (*stop_ap)(void *priv);
|
||||||
};
|
};
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
#ifdef NEED_AP_MLME
|
#ifdef NEED_AP_MLME
|
||||||
@@ -822,6 +884,10 @@ static void hostapd_ctrl_iface_receive(i
|
@@ -873,6 +935,10 @@ static void hostapd_ctrl_iface_receive(i
|
||||||
reply_len += res;
|
reply_len += res;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_RADIUS */
|
#endif /* CONFIG_NO_RADIUS */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/wpa_supplicant/wpa_supplicant_i.h
|
--- a/wpa_supplicant/wpa_supplicant_i.h
|
||||||
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
||||||
@@ -99,6 +99,8 @@ struct wpa_interface {
|
@@ -100,6 +100,8 @@ struct wpa_interface {
|
||||||
* receiving of EAPOL frames from an additional interface.
|
* receiving of EAPOL frames from an additional interface.
|
||||||
*/
|
*/
|
||||||
const char *bridge_ifname;
|
const char *bridge_ifname;
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -337,6 +339,8 @@ struct wpa_supplicant {
|
@@ -260,6 +262,8 @@ struct wpa_supplicant {
|
||||||
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
|
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
|
||||||
char bridge_ifname[16];
|
char bridge_ifname[16];
|
||||||
|
|
||||||
|
@ -20,21 +20,31 @@
|
||||||
int countermeasures;
|
int countermeasures;
|
||||||
--- a/wpa_supplicant/Makefile
|
--- a/wpa_supplicant/Makefile
|
||||||
+++ b/wpa_supplicant/Makefile
|
+++ b/wpa_supplicant/Makefile
|
||||||
@@ -52,6 +52,11 @@ OBJS_p += ../src/utils/wpabuf.o
|
@@ -13,6 +13,10 @@ PKG_CONFIG ?= pkg-config
|
||||||
OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
|
CFLAGS += -I../src
|
||||||
OBJS_c += ../src/utils/wpa_debug.o
|
CFLAGS += -I../src/utils
|
||||||
|
|
||||||
+ifdef MULTICALL
|
+ifdef MULTICALL
|
||||||
+OBJS += ../src/common/wpa_ctrl.o
|
|
||||||
+CFLAGS += -DMULTICALL
|
+CFLAGS += -DMULTICALL
|
||||||
+endif
|
+endif
|
||||||
+
|
+
|
||||||
-include .config
|
-include .config
|
||||||
-include $(if $(MULTICALL),../hostapd/.config)
|
-include $(if $(MULTICALL),../hostapd/.config)
|
||||||
|
|
||||||
|
@@ -69,6 +73,10 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr
|
||||||
|
OBJS_c += ../src/utils/wpa_debug.o
|
||||||
|
OBJS_c += ../src/utils/common.o
|
||||||
|
|
||||||
|
+ifdef MULTICALL
|
||||||
|
+OBJS += ../src/common/wpa_ctrl.o
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
ifndef CONFIG_OS
|
||||||
|
ifdef CONFIG_NATIVE_WINDOWS
|
||||||
|
CONFIG_OS=win32
|
||||||
--- a/wpa_supplicant/wpa_supplicant.c
|
--- a/wpa_supplicant/wpa_supplicant.c
|
||||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||||
@@ -123,6 +123,55 @@ extern int wpa_debug_show_keys;
|
@@ -125,6 +125,55 @@ extern int wpa_debug_show_keys;
|
||||||
extern int wpa_debug_timestamp;
|
extern int wpa_debug_timestamp;
|
||||||
extern struct wpa_driver_ops *wpa_drivers[];
|
extern struct wpa_driver_ops *wpa_drivers[];
|
||||||
|
|
||||||
|
@ -90,7 +100,7 @@
|
||||||
/* Configure default/group WEP keys for static WEP */
|
/* Configure default/group WEP keys for static WEP */
|
||||||
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
|
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
|
||||||
{
|
{
|
||||||
@@ -598,8 +647,16 @@ void wpa_supplicant_set_state(struct wpa
|
@@ -632,8 +681,16 @@ void wpa_supplicant_set_state(struct wpa
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
wpas_p2p_completed(wpa_s);
|
wpas_p2p_completed(wpa_s);
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
@ -107,7 +117,7 @@
|
||||||
wpa_s->new_connection = 1;
|
wpa_s->new_connection = 1;
|
||||||
wpa_drv_set_operstate(wpa_s, 0);
|
wpa_drv_set_operstate(wpa_s, 0);
|
||||||
#ifndef IEEE8021X_EAPOL
|
#ifndef IEEE8021X_EAPOL
|
||||||
@@ -2157,6 +2214,21 @@ static int wpa_supplicant_init_iface(str
|
@@ -2245,6 +2302,21 @@ static int wpa_supplicant_init_iface(str
|
||||||
os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname,
|
os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname,
|
||||||
sizeof(wpa_s->bridge_ifname));
|
sizeof(wpa_s->bridge_ifname));
|
||||||
}
|
}
|
||||||
|
@ -139,7 +149,7 @@
|
||||||
#include "drivers/driver.h"
|
#include "drivers/driver.h"
|
||||||
#include "wpa_supplicant_i.h"
|
#include "wpa_supplicant_i.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -70,6 +71,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_
|
@@ -79,6 +80,8 @@ struct wpa_bss * wpa_bss_get(struct wpa_
|
||||||
|
|
||||||
static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src)
|
static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src)
|
||||||
{
|
{
|
||||||
|
@ -148,7 +158,7 @@
|
||||||
os_time_t usec;
|
os_time_t usec;
|
||||||
|
|
||||||
dst->flags = src->flags;
|
dst->flags = src->flags;
|
||||||
@@ -82,6 +85,12 @@ static void wpa_bss_copy_res(struct wpa_
|
@@ -91,6 +94,12 @@ static void wpa_bss_copy_res(struct wpa_
|
||||||
dst->level = src->level;
|
dst->level = src->level;
|
||||||
dst->tsf = src->tsf;
|
dst->tsf = src->tsf;
|
||||||
|
|
||||||
|
@ -163,7 +173,7 @@
|
||||||
usec = (src->age % 1000) * 1000;
|
usec = (src->age % 1000) * 1000;
|
||||||
--- a/wpa_supplicant/bss.h
|
--- a/wpa_supplicant/bss.h
|
||||||
+++ b/wpa_supplicant/bss.h
|
+++ b/wpa_supplicant/bss.h
|
||||||
@@ -56,6 +56,7 @@ struct wpa_bss {
|
@@ -57,6 +57,7 @@ struct wpa_bss {
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
u8 bssid[ETH_ALEN];
|
u8 bssid[ETH_ALEN];
|
||||||
u8 ssid[32];
|
u8 ssid[32];
|
||||||
|
@ -180,9 +190,9 @@
|
||||||
- " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
|
- " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
|
||||||
+ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>]"
|
+ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>]"
|
||||||
"[-p<driver_param>] \\\n"
|
"[-p<driver_param>] \\\n"
|
||||||
" [-b<br_ifname>] [-f<debug file>] \\\n"
|
" [-b<br_ifname>] [-f<debug file>] [-e<entropy file>] "
|
||||||
" [-o<override driver>] [-O<override ctrl>] \\\n"
|
"\\\n"
|
||||||
@@ -67,6 +67,7 @@ static void usage(void)
|
@@ -69,6 +69,7 @@ static void usage(void)
|
||||||
#endif /* CONFIG_DEBUG_SYSLOG */
|
#endif /* CONFIG_DEBUG_SYSLOG */
|
||||||
printf(" -t = include timestamp in debug messages\n"
|
printf(" -t = include timestamp in debug messages\n"
|
||||||
" -h = show this help text\n"
|
" -h = show this help text\n"
|
||||||
|
@ -190,16 +200,16 @@
|
||||||
" -L = show license (GPL and BSD)\n"
|
" -L = show license (GPL and BSD)\n"
|
||||||
" -o = override driver parameter for new interfaces\n"
|
" -o = override driver parameter for new interfaces\n"
|
||||||
" -O = override ctrl_interface parameter for new interfaces\n"
|
" -O = override ctrl_interface parameter for new interfaces\n"
|
||||||
@@ -143,7 +144,7 @@ int main(int argc, char *argv[])
|
@@ -145,7 +146,7 @@ int main(int argc, char *argv[])
|
||||||
wpa_supplicant_fd_workaround();
|
wpa_supplicant_fd_workaround();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
- c = getopt(argc, argv, "b:Bc:C:D:df:g:hi:KLNo:O:p:P:qstuvW");
|
- c = getopt(argc, argv, "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qstuvW");
|
||||||
+ c = getopt(argc, argv, "b:Bc:C:D:df:g:hH:i:KLNo:O:p:P:qstuvW");
|
+ c = getopt(argc, argv, "b:Bc:C:D:de:f:g:hH:i:KLNo:O:p:P:qstuvW");
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
break;
|
break;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
@@ -184,6 +185,9 @@ int main(int argc, char *argv[])
|
@@ -189,6 +190,9 @@ int main(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
exitcode = 0;
|
exitcode = 0;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/hostapd/Makefile
|
--- a/hostapd/Makefile
|
||||||
+++ b/hostapd/Makefile
|
+++ b/hostapd/Makefile
|
||||||
@@ -119,6 +119,9 @@ endif
|
@@ -128,6 +128,9 @@ endif
|
||||||
ifdef CONFIG_NO_CTRL_IFACE
|
ifdef CONFIG_NO_CTRL_IFACE
|
||||||
CFLAGS += -DCONFIG_NO_CTRL_IFACE
|
CFLAGS += -DCONFIG_NO_CTRL_IFACE
|
||||||
else
|
else
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
endif
|
endif
|
||||||
--- a/hostapd/ctrl_iface.c
|
--- a/hostapd/ctrl_iface.c
|
||||||
+++ b/hostapd/ctrl_iface.c
|
+++ b/hostapd/ctrl_iface.c
|
||||||
@@ -855,6 +855,7 @@ static void hostapd_ctrl_iface_receive(i
|
@@ -906,6 +906,7 @@ static void hostapd_ctrl_iface_receive(i
|
||||||
} else if (os_strncmp(buf, "RELOG", 5) == 0) {
|
} else if (os_strncmp(buf, "RELOG", 5) == 0) {
|
||||||
if (wpa_debug_reopen_file() < 0)
|
if (wpa_debug_reopen_file() < 0)
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||||
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
||||||
if (reply_len >= 0) {
|
if (reply_len >= 0) {
|
||||||
@@ -884,10 +885,12 @@ static void hostapd_ctrl_iface_receive(i
|
@@ -935,10 +936,12 @@ static void hostapd_ctrl_iface_receive(i
|
||||||
reply_len += res;
|
reply_len += res;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_RADIUS */
|
#endif /* CONFIG_NO_RADIUS */
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
||||||
reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
|
reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
|
||||||
reply_size);
|
reply_size);
|
||||||
@@ -897,6 +900,7 @@ static void hostapd_ctrl_iface_receive(i
|
@@ -948,6 +951,7 @@ static void hostapd_ctrl_iface_receive(i
|
||||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||||
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
||||||
reply_size);
|
reply_size);
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
--- a/wpa_supplicant/Makefile
|
--- a/wpa_supplicant/Makefile
|
||||||
+++ b/wpa_supplicant/Makefile
|
+++ b/wpa_supplicant/Makefile
|
||||||
@@ -675,6 +675,9 @@ ifdef CONFIG_IEEE80211N
|
@@ -709,6 +709,9 @@ ifdef CONFIG_IEEE80211N
|
||||||
OBJS += ../src/ap/ieee802_11_ht.o
|
OBJS += ../src/ap/ieee802_11_ht.o
|
||||||
endif
|
endif
|
||||||
ifdef CONFIG_CTRL_IFACE
|
ifdef CONFIG_CTRL_IFACE
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
--- a/wpa_supplicant/ctrl_iface.c
|
--- a/wpa_supplicant/ctrl_iface.c
|
||||||
+++ b/wpa_supplicant/ctrl_iface.c
|
+++ b/wpa_supplicant/ctrl_iface.c
|
||||||
@@ -2929,6 +2929,7 @@ char * wpa_supplicant_ctrl_iface_process
|
@@ -3231,6 +3231,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
|
} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
|
||||||
wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
|
wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||||
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
|
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
|
||||||
if (reply_len >= 0) {
|
if (reply_len >= 0) {
|
||||||
@@ -2940,6 +2941,7 @@ char * wpa_supplicant_ctrl_iface_process
|
@@ -3242,6 +3243,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||||
else
|
else
|
||||||
reply_len += res;
|
reply_len += res;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
|
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
|
||||||
reply_len = wpa_supplicant_ctrl_iface_status(
|
reply_len = wpa_supplicant_ctrl_iface_status(
|
||||||
wpa_s, buf + 6, reply, reply_size);
|
wpa_s, buf + 6, reply, reply_size);
|
||||||
@@ -3245,6 +3247,7 @@ char * wpa_supplicant_ctrl_iface_process
|
@@ -3570,6 +3572,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||||
reply_len = wpa_supplicant_ctrl_iface_bss(
|
reply_len = wpa_supplicant_ctrl_iface_bss(
|
||||||
wpa_s, buf + 4, reply, reply_size);
|
wpa_s, buf + 4, reply, reply_size);
|
||||||
#ifdef CONFIG_AP
|
#ifdef CONFIG_AP
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
||||||
reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
|
reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
|
||||||
} else if (os_strncmp(buf, "STA ", 4) == 0) {
|
} else if (os_strncmp(buf, "STA ", 4) == 0) {
|
||||||
@@ -3253,6 +3256,7 @@ char * wpa_supplicant_ctrl_iface_process
|
@@ -3578,6 +3581,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||||
reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
|
reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
|
||||||
reply_size);
|
reply_size);
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
+#endif
|
+#endif
|
||||||
--- a/src/ap/ieee802_1x.c
|
--- a/src/ap/ieee802_1x.c
|
||||||
+++ b/src/ap/ieee802_1x.c
|
+++ b/src/ap/ieee802_1x.c
|
||||||
@@ -1896,6 +1896,7 @@ static const char * bool_txt(Boolean boo
|
@@ -1926,6 +1926,7 @@ static const char * bool_txt(Boolean boo
|
||||||
return bool ? "TRUE" : "FALSE";
|
return bool ? "TRUE" : "FALSE";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
@@ -2047,6 +2048,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
@@ -2078,6 +2079,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
struct sta_info *sta, int success)
|
struct sta_info *sta, int success)
|
||||||
--- a/src/ap/wpa_auth.c
|
--- a/src/ap/wpa_auth.c
|
||||||
+++ b/src/ap/wpa_auth.c
|
+++ b/src/ap/wpa_auth.c
|
||||||
@@ -2491,6 +2491,7 @@ static int wpa_cipher_bits(int cipher)
|
@@ -2534,6 +2534,7 @@ static int wpa_cipher_bits(int cipher)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
|
|
||||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||||
#define RSN_SUITE_ARG(s) \
|
#define RSN_SUITE_ARG(s) \
|
||||||
@@ -2654,7 +2655,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
@@ -2697,7 +2698,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
{
|
{
|
||||||
--- a/src/rsn_supp/wpa.c
|
--- a/src/rsn_supp/wpa.c
|
||||||
+++ b/src/rsn_supp/wpa.c
|
+++ b/src/rsn_supp/wpa.c
|
||||||
@@ -1913,6 +1913,8 @@ static u32 wpa_cipher_suite(struct wpa_s
|
@@ -1919,6 +1919,8 @@ static u32 wpa_cipher_suite(struct wpa_s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||||
#define RSN_SUITE_ARG(s) \
|
#define RSN_SUITE_ARG(s) \
|
||||||
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
|
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
|
||||||
@@ -1992,6 +1994,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
@@ -1998,6 +2000,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
||||||
|
|
||||||
return (int) len;
|
return (int) len;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/common/wpa_common.c
|
--- a/src/common/wpa_common.c
|
||||||
+++ b/src/common/wpa_common.c
|
+++ b/src/common/wpa_common.c
|
||||||
@@ -811,6 +811,31 @@ const char * wpa_key_mgmt_txt(int key_mg
|
@@ -959,6 +959,31 @@ const char * wpa_key_mgmt_txt(int key_mg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
int wpa_compare_rsn_ie(int ft_initial_assoc,
|
int wpa_compare_rsn_ie(int ft_initial_assoc,
|
||||||
const u8 *ie1, size_t ie1len,
|
const u8 *ie1, size_t ie1len,
|
||||||
const u8 *ie2, size_t ie2len)
|
const u8 *ie2, size_t ie2len)
|
||||||
@@ -818,8 +843,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
|
@@ -966,8 +991,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
|
||||||
if (ie1 == NULL || ie2 == NULL)
|
if (ie1 == NULL || ie2 == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/hostapd.c
|
--- a/src/ap/hostapd.c
|
||||||
+++ b/src/ap/hostapd.c
|
+++ b/src/ap/hostapd.c
|
||||||
@@ -723,11 +723,8 @@ int hostapd_setup_interface_complete(str
|
@@ -720,11 +720,8 @@ int hostapd_setup_interface_complete(str
|
||||||
size_t j;
|
size_t j;
|
||||||
u8 *prev_addr;
|
u8 *prev_addr;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
||||||
if (hapd->iconf->channel) {
|
if (hapd->iconf->channel) {
|
||||||
@@ -743,7 +740,7 @@ int hostapd_setup_interface_complete(str
|
@@ -740,7 +737,7 @@ int hostapd_setup_interface_complete(str
|
||||||
hapd->iconf->secondary_channel)) {
|
hapd->iconf->secondary_channel)) {
|
||||||
wpa_printf(MSG_ERROR, "Could not set channel for "
|
wpa_printf(MSG_ERROR, "Could not set channel for "
|
||||||
"kernel driver");
|
"kernel driver");
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,7 +751,7 @@ int hostapd_setup_interface_complete(str
|
@@ -751,7 +748,7 @@ int hostapd_setup_interface_complete(str
|
||||||
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
|
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
|
||||||
HOSTAPD_LEVEL_WARNING,
|
HOSTAPD_LEVEL_WARNING,
|
||||||
"Failed to prepare rates table.");
|
"Failed to prepare rates table.");
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -762,14 +759,14 @@ int hostapd_setup_interface_complete(str
|
@@ -759,14 +756,14 @@ int hostapd_setup_interface_complete(str
|
||||||
hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) {
|
hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) {
|
||||||
wpa_printf(MSG_ERROR, "Could not set RTS threshold for "
|
wpa_printf(MSG_ERROR, "Could not set RTS threshold for "
|
||||||
"kernel driver");
|
"kernel driver");
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
prev_addr = hapd->own_addr;
|
prev_addr = hapd->own_addr;
|
||||||
@@ -779,7 +776,7 @@ int hostapd_setup_interface_complete(str
|
@@ -776,7 +773,7 @@ int hostapd_setup_interface_complete(str
|
||||||
if (j)
|
if (j)
|
||||||
os_memcpy(hapd->own_addr, prev_addr, ETH_ALEN);
|
os_memcpy(hapd->own_addr, prev_addr, ETH_ALEN);
|
||||||
if (hostapd_setup_bss(hapd, j == 0))
|
if (hostapd_setup_bss(hapd, j == 0))
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
if (hostapd_mac_comp_empty(hapd->conf->bssid) == 0)
|
if (hostapd_mac_comp_empty(hapd->conf->bssid) == 0)
|
||||||
prev_addr = hapd->own_addr;
|
prev_addr = hapd->own_addr;
|
||||||
}
|
}
|
||||||
@@ -791,7 +788,7 @@ int hostapd_setup_interface_complete(str
|
@@ -788,7 +785,7 @@ int hostapd_setup_interface_complete(str
|
||||||
if (hostapd_driver_commit(hapd) < 0) {
|
if (hostapd_driver_commit(hapd) < 0) {
|
||||||
wpa_printf(MSG_ERROR, "%s: Failed to commit driver "
|
wpa_printf(MSG_ERROR, "%s: Failed to commit driver "
|
||||||
"configuration", __func__);
|
"configuration", __func__);
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -815,6 +812,11 @@ int hostapd_setup_interface_complete(str
|
@@ -812,6 +809,11 @@ int hostapd_setup_interface_complete(str
|
||||||
iface->init_complete(iface);
|
iface->init_complete(iface);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
static u32 pool[POOL_WORDS];
|
static u32 pool[POOL_WORDS];
|
||||||
static unsigned int input_rotate = 0;
|
static unsigned int input_rotate = 0;
|
||||||
static unsigned int pool_pos = 0;
|
static unsigned int pool_pos = 0;
|
||||||
@@ -122,7 +126,7 @@ static void random_extract(u8 *out)
|
@@ -128,7 +132,7 @@ static void random_extract(u8 *out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
{
|
{
|
||||||
struct os_time t;
|
struct os_time t;
|
||||||
static unsigned int count = 0;
|
static unsigned int count = 0;
|
||||||
@@ -191,16 +195,22 @@ int random_get_bytes(void *buf, size_t l
|
@@ -197,16 +201,22 @@ int random_get_bytes(void *buf, size_t l
|
||||||
int random_pool_ready(void)
|
int random_pool_ready(void)
|
||||||
{
|
{
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -51,19 +51,15 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to fetch some more data from the kernel high quality
|
* Try to fetch some more data from the kernel high quality
|
||||||
@@ -232,8 +242,10 @@ int random_pool_ready(void)
|
@@ -241,6 +251,7 @@ int random_pool_ready(void)
|
||||||
dummy_key_avail += res;
|
if (dummy_key_avail == sizeof(dummy_key)) {
|
||||||
close(fd);
|
if (own_pool_ready < MIN_READY_MARK)
|
||||||
|
own_pool_ready = MIN_READY_MARK;
|
||||||
- if (dummy_key_avail == sizeof(dummy_key))
|
|
||||||
+ if (dummy_key_avail == sizeof(dummy_key)) {
|
|
||||||
+ random_mark_pool_ready();
|
+ random_mark_pool_ready();
|
||||||
|
random_write_entropy();
|
||||||
return 1;
|
return 1;
|
||||||
+ }
|
}
|
||||||
|
@@ -253,6 +264,7 @@ int random_pool_ready(void)
|
||||||
wpa_printf(MSG_INFO, "random: Only %u/%u bytes of strong "
|
|
||||||
"random data available from /dev/random",
|
|
||||||
@@ -243,6 +255,7 @@ int random_pool_ready(void)
|
|
||||||
total_collected + 10 * own_pool_ready > MIN_COLLECT_ENTROPY) {
|
total_collected + 10 * own_pool_ready > MIN_COLLECT_ENTROPY) {
|
||||||
wpa_printf(MSG_INFO, "random: Allow operation to proceed "
|
wpa_printf(MSG_INFO, "random: Allow operation to proceed "
|
||||||
"based on internal entropy");
|
"based on internal entropy");
|
||||||
|
@ -71,7 +67,7 @@
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,9 +271,15 @@ int random_pool_ready(void)
|
@@ -268,10 +280,16 @@ int random_pool_ready(void)
|
||||||
|
|
||||||
void random_mark_pool_ready(void)
|
void random_mark_pool_ready(void)
|
||||||
{
|
{
|
||||||
|
@ -80,6 +76,7 @@
|
||||||
own_pool_ready++;
|
own_pool_ready++;
|
||||||
wpa_printf(MSG_DEBUG, "random: Mark internal entropy pool to be "
|
wpa_printf(MSG_DEBUG, "random: Mark internal entropy pool to be "
|
||||||
"ready (count=%u/%u)", own_pool_ready, MIN_READY_MARK);
|
"ready (count=%u/%u)", own_pool_ready, MIN_READY_MARK);
|
||||||
|
random_write_entropy();
|
||||||
+
|
+
|
||||||
+ fd = open(RANDOM_STAMPFILE, O_CREAT | O_WRONLY | O_EXCL | O_NOFOLLOW, 0600);
|
+ fd = open(RANDOM_STAMPFILE, O_CREAT | O_WRONLY | O_EXCL | O_NOFOLLOW, 0600);
|
||||||
+ if (fd >= 0)
|
+ if (fd >= 0)
|
||||||
|
@ -87,9 +84,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -335,3 +354,22 @@ void random_deinit(void)
|
@@ -428,3 +446,22 @@ void random_deinit(void)
|
||||||
random_close_fd();
|
os_free(random_entropy_file);
|
||||||
#endif /* __linux__ */
|
random_entropy_file = NULL;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+#endif /* CONFIG_NO_RANDOM_POOL */
|
+#endif /* CONFIG_NO_RANDOM_POOL */
|
||||||
|
@ -110,25 +107,9 @@
|
||||||
+ random_pool_add_randomness(buf, len);
|
+ random_pool_add_randomness(buf, len);
|
||||||
+#endif
|
+#endif
|
||||||
+}
|
+}
|
||||||
--- a/hostapd/Makefile
|
|
||||||
+++ b/hostapd/Makefile
|
|
||||||
@@ -698,11 +698,11 @@ endif
|
|
||||||
ifdef CONFIG_NO_RANDOM_POOL
|
|
||||||
CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
|
||||||
else
|
|
||||||
-OBJS += ../src/crypto/random.o
|
|
||||||
-HOBJS += ../src/crypto/random.o
|
|
||||||
HOBJS += $(SHA1OBJS)
|
|
||||||
HOBJS += ../src/crypto/md5.o
|
|
||||||
endif
|
|
||||||
+OBJS += ../src/crypto/random.o
|
|
||||||
+HOBJS += ../src/crypto/random.o
|
|
||||||
|
|
||||||
ifdef CONFIG_RADIUS_SERVER
|
|
||||||
CFLAGS += -DRADIUS_SERVER
|
|
||||||
--- a/wpa_supplicant/Makefile
|
--- a/wpa_supplicant/Makefile
|
||||||
+++ b/wpa_supplicant/Makefile
|
+++ b/wpa_supplicant/Makefile
|
||||||
@@ -1101,9 +1101,8 @@ endif
|
@@ -1137,9 +1137,8 @@ endif
|
||||||
|
|
||||||
ifdef CONFIG_NO_RANDOM_POOL
|
ifdef CONFIG_NO_RANDOM_POOL
|
||||||
CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
||||||
|
@ -141,7 +122,7 @@
|
||||||
ifeq ($(CONFIG_CTRL_IFACE), y)
|
ifeq ($(CONFIG_CTRL_IFACE), y)
|
||||||
--- a/wpa_supplicant/Android.mk
|
--- a/wpa_supplicant/Android.mk
|
||||||
+++ b/wpa_supplicant/Android.mk
|
+++ b/wpa_supplicant/Android.mk
|
||||||
@@ -1109,9 +1109,8 @@ endif
|
@@ -1132,9 +1132,8 @@ endif
|
||||||
|
|
||||||
ifdef CONFIG_NO_RANDOM_POOL
|
ifdef CONFIG_NO_RANDOM_POOL
|
||||||
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
||||||
|
@ -154,7 +135,7 @@
|
||||||
ifeq ($(CONFIG_CTRL_IFACE), y)
|
ifeq ($(CONFIG_CTRL_IFACE), y)
|
||||||
--- a/hostapd/Android.mk
|
--- a/hostapd/Android.mk
|
||||||
+++ b/hostapd/Android.mk
|
+++ b/hostapd/Android.mk
|
||||||
@@ -717,11 +717,11 @@ endif
|
@@ -720,11 +720,11 @@ endif
|
||||||
ifdef CONFIG_NO_RANDOM_POOL
|
ifdef CONFIG_NO_RANDOM_POOL
|
||||||
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
||||||
else
|
else
|
||||||
|
@ -168,24 +149,20 @@
|
||||||
|
|
||||||
ifdef CONFIG_RADIUS_SERVER
|
ifdef CONFIG_RADIUS_SERVER
|
||||||
L_CFLAGS += -DRADIUS_SERVER
|
L_CFLAGS += -DRADIUS_SERVER
|
||||||
--- a/src/crypto/random.h
|
--- a/hostapd/Makefile
|
||||||
+++ b/src/crypto/random.h
|
+++ b/hostapd/Makefile
|
||||||
@@ -18,17 +18,16 @@
|
@@ -707,12 +707,12 @@ endif
|
||||||
#ifdef CONFIG_NO_RANDOM_POOL
|
ifdef CONFIG_NO_RANDOM_POOL
|
||||||
#define random_init() do { } while (0)
|
CFLAGS += -DCONFIG_NO_RANDOM_POOL
|
||||||
#define random_deinit() do { } while (0)
|
else
|
||||||
-#define random_add_randomness(b, l) do { } while (0)
|
-OBJS += ../src/crypto/random.o
|
||||||
#define random_get_bytes(b, l) os_get_random((b), (l))
|
-HOBJS += ../src/crypto/random.o
|
||||||
#define random_pool_ready() 1
|
HOBJS += ../src/utils/eloop.o
|
||||||
#define random_mark_pool_ready() do { } while (0)
|
HOBJS += $(SHA1OBJS)
|
||||||
#else /* CONFIG_NO_RANDOM_POOL */
|
HOBJS += ../src/crypto/md5.o
|
||||||
void random_init(void);
|
endif
|
||||||
void random_deinit(void);
|
+OBJS += ../src/crypto/random.o
|
||||||
-void random_add_randomness(const void *buf, size_t len);
|
+HOBJS += ../src/crypto/random.o
|
||||||
int random_get_bytes(void *buf, size_t len);
|
|
||||||
int random_pool_ready(void);
|
|
||||||
void random_mark_pool_ready(void);
|
|
||||||
#endif /* CONFIG_NO_RANDOM_POOL */
|
|
||||||
+void random_add_randomness(const void *buf, size_t len);
|
|
||||||
|
|
||||||
#endif /* RANDOM_H */
|
ifdef CONFIG_RADIUS_SERVER
|
||||||
|
CFLAGS += -DRADIUS_SERVER
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
--- a/src/drivers/driver_nl80211.c
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
+++ b/src/drivers/driver_nl80211.c
|
||||||
@@ -5005,9 +5005,6 @@ static int wpa_driver_nl80211_set_mode(v
|
@@ -5867,8 +5867,6 @@ static int wpa_driver_nl80211_set_mode(s
|
||||||
/* Try to set the mode again while the interface is
|
|
||||||
* down */
|
|
||||||
ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
|
ret = nl80211_set_mode(drv, drv->ifindex, nlmode);
|
||||||
- if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname,
|
if (ret == -EACCES)
|
||||||
- 1))
|
|
||||||
- ret = -1;
|
|
||||||
if (!ret)
|
|
||||||
break;
|
break;
|
||||||
} else
|
- res = linux_set_iface_flags(drv->global->ioctl_sock,
|
||||||
@@ -5020,6 +5017,8 @@ static int wpa_driver_nl80211_set_mode(v
|
- bss->ifname, 1);
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Mode change succeeded while "
|
if (res && !ret)
|
||||||
|
ret = -1;
|
||||||
|
else if (ret != -EBUSY)
|
||||||
|
@@ -5884,6 +5882,7 @@ static int wpa_driver_nl80211_set_mode(s
|
||||||
"interface is down");
|
"interface is down");
|
||||||
drv->nlmode = nlmode;
|
drv->nlmode = nlmode;
|
||||||
+ if (linux_set_iface_flags(drv->ioctl_sock, bss->ifname, 1))
|
drv->ignore_if_down_event = 1;
|
||||||
+ ret = -1;
|
+ linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
|
||||||
@@ -5660,6 +5660,9 @@ static int i802_set_wds_sta(void *priv,
|
|
||||||
linux_set_iface_flags(drv->ioctl_sock, name, 1);
|
|
||||||
return i802_set_sta_vlan(priv, addr, name, 0);
|
|
||||||
} else {
|
|
||||||
+ if (bridge_ifname)
|
|
||||||
+ linux_br_del_if(drv->ioctl_sock, bridge_ifname, name);
|
|
||||||
+
|
|
||||||
i802_set_sta_vlan(priv, addr, bss->ifname, 0);
|
|
||||||
return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN,
|
|
||||||
name);
|
|
||||||
@@ -6021,14 +6024,14 @@ static int wpa_driver_nl80211_if_remove(
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
#ifdef HOSTAPD
|
|
||||||
- if (bss->added_if_into_bridge) {
|
|
||||||
+ if (type == WPA_IF_AP_BSS && bss->added_if_into_bridge) {
|
|
||||||
if (linux_br_del_if(drv->ioctl_sock, bss->brname, bss->ifname)
|
|
||||||
< 0)
|
|
||||||
wpa_printf(MSG_INFO, "nl80211: Failed to remove "
|
|
||||||
"interface %s from bridge %s: %s",
|
|
||||||
bss->ifname, bss->brname, strerror(errno));
|
|
||||||
}
|
|
||||||
- if (bss->added_bridge) {
|
|
||||||
+ if (type == WPA_IF_AP_BSS && bss->added_bridge) {
|
|
||||||
if (linux_br_del(drv->ioctl_sock, bss->brname) < 0)
|
|
||||||
wpa_printf(MSG_INFO, "nl80211: Failed to remove "
|
|
||||||
"bridge %s: %s",
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/wps_hostapd.c
|
--- a/src/ap/wps_hostapd.c
|
||||||
+++ b/src/ap/wps_hostapd.c
|
+++ b/src/ap/wps_hostapd.c
|
||||||
@@ -773,11 +773,9 @@ int hostapd_init_wps(struct hostapd_data
|
@@ -799,11 +799,9 @@ int hostapd_init_wps(struct hostapd_data
|
||||||
|
|
||||||
if (conf->rsn_pairwise & WPA_CIPHER_CCMP)
|
if (conf->rsn_pairwise & WPA_CIPHER_CCMP)
|
||||||
wps->encr_types |= WPS_ENCR_AES;
|
wps->encr_types |= WPS_ENCR_AES;
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK)
|
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK)
|
||||||
wps->auth_types |= WPS_AUTH_WPAPSK;
|
wps->auth_types |= WPS_AUTH_WPAPSK;
|
||||||
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X)
|
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X)
|
||||||
@@ -785,7 +783,7 @@ int hostapd_init_wps(struct hostapd_data
|
@@ -811,7 +809,7 @@ int hostapd_init_wps(struct hostapd_data
|
||||||
|
|
||||||
if (conf->wpa_pairwise & WPA_CIPHER_CCMP)
|
if (conf->wpa_pairwise & WPA_CIPHER_CCMP)
|
||||||
wps->encr_types |= WPS_ENCR_AES;
|
wps->encr_types |= WPS_ENCR_AES;
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/ap/wpa_auth.c
|
--- a/src/ap/wpa_auth.c
|
||||||
+++ b/src/ap/wpa_auth.c
|
+++ b/src/ap/wpa_auth.c
|
||||||
@@ -1288,7 +1288,7 @@ static void wpa_send_eapol(struct wpa_au
|
@@ -1330,7 +1330,7 @@ static void wpa_send_eapol(struct wpa_au
|
||||||
keyidx, encr, 0);
|
keyidx, encr, 0);
|
||||||
|
|
||||||
ctr = pairwise ? sm->TimeoutCtr : sm->GTimeoutCtr;
|
ctr = pairwise ? sm->TimeoutCtr : sm->GTimeoutCtr;
|
|
@ -1,48 +0,0 @@
|
||||||
--- a/src/ap/ieee802_11.c
|
|
||||||
+++ b/src/ap/ieee802_11.c
|
|
||||||
@@ -1629,13 +1629,6 @@ static void handle_assoc_cb(struct hosta
|
|
||||||
int new_assoc = 1;
|
|
||||||
struct ieee80211_ht_capabilities ht_cap;
|
|
||||||
|
|
||||||
- if (!ok) {
|
|
||||||
- hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
|
|
||||||
- HOSTAPD_LEVEL_DEBUG,
|
|
||||||
- "did not acknowledge association response");
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) :
|
|
||||||
sizeof(mgmt->u.assoc_resp))) {
|
|
||||||
printf("handle_assoc_cb(reassoc=%d) - too short payload "
|
|
||||||
@@ -1643,11 +1636,6 @@ static void handle_assoc_cb(struct hosta
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (reassoc)
|
|
||||||
- status = le_to_host16(mgmt->u.reassoc_resp.status_code);
|
|
||||||
- else
|
|
||||||
- status = le_to_host16(mgmt->u.assoc_resp.status_code);
|
|
||||||
-
|
|
||||||
sta = ap_get_sta(hapd, mgmt->da);
|
|
||||||
if (!sta) {
|
|
||||||
printf("handle_assoc_cb: STA " MACSTR " not found\n",
|
|
||||||
@@ -1655,6 +1643,19 @@ static void handle_assoc_cb(struct hosta
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (!ok) {
|
|
||||||
+ hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
|
|
||||||
+ HOSTAPD_LEVEL_DEBUG,
|
|
||||||
+ "did not acknowledge association response");
|
|
||||||
+ sta->flags &= ~WLAN_STA_ASSOC_REQ_OK;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (reassoc)
|
|
||||||
+ status = le_to_host16(mgmt->u.reassoc_resp.status_code);
|
|
||||||
+ else
|
|
||||||
+ status = le_to_host16(mgmt->u.assoc_resp.status_code);
|
|
||||||
+
|
|
||||||
if (status != WLAN_STATUS_SUCCESS)
|
|
||||||
goto fail;
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/hostapd/config_file.c
|
--- a/hostapd/config_file.c
|
||||||
+++ b/hostapd/config_file.c
|
+++ b/hostapd/config_file.c
|
||||||
@@ -1901,6 +1901,10 @@ struct hostapd_config * hostapd_config_r
|
@@ -1935,6 +1935,10 @@ struct hostapd_config * hostapd_config_r
|
||||||
"ht_capab", line);
|
"ht_capab", line);
|
||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
#endif /* CONFIG_IEEE80211N */
|
#endif /* CONFIG_IEEE80211N */
|
||||||
--- a/src/ap/ap_config.h
|
--- a/src/ap/ap_config.h
|
||||||
+++ b/src/ap/ap_config.h
|
+++ b/src/ap/ap_config.h
|
||||||
@@ -394,6 +394,7 @@ struct hostapd_config {
|
@@ -416,6 +416,7 @@ struct hostapd_config {
|
||||||
int ieee80211n;
|
int ieee80211n;
|
||||||
int secondary_channel;
|
int secondary_channel;
|
||||||
int require_ht;
|
int require_ht;
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
#include "ieee802_11_auth.h"
|
#include "ieee802_11_auth.h"
|
||||||
#include "vlan_init.h"
|
#include "vlan_init.h"
|
||||||
#include "wpa_auth.h"
|
#include "wpa_auth.h"
|
||||||
@@ -285,6 +286,7 @@ static void hostapd_cleanup_iface_pre(st
|
@@ -291,6 +292,7 @@ static void hostapd_cleanup_iface_pre(st
|
||||||
*/
|
*/
|
||||||
static void hostapd_cleanup_iface(struct hostapd_iface *iface)
|
static void hostapd_cleanup_iface(struct hostapd_iface *iface)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
os_free(iface->current_rates);
|
os_free(iface->current_rates);
|
||||||
--- a/src/ap/hostapd.h
|
--- a/src/ap/hostapd.h
|
||||||
+++ b/src/ap/hostapd.h
|
+++ b/src/ap/hostapd.h
|
||||||
@@ -220,6 +220,9 @@ struct hostapd_iface {
|
@@ -226,6 +226,9 @@ struct hostapd_iface {
|
||||||
/* Overlapping BSS information */
|
/* Overlapping BSS information */
|
||||||
int olbc_ht;
|
int olbc_ht;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
--- a/src/ap/ieee802_11.c
|
--- a/src/ap/ieee802_11.c
|
||||||
+++ b/src/ap/ieee802_11.c
|
+++ b/src/ap/ieee802_11.c
|
||||||
@@ -1242,6 +1242,9 @@ static void handle_beacon(struct hostapd
|
@@ -1193,6 +1193,9 @@ static void handle_beacon(struct hostapd
|
||||||
sizeof(mgmt->u.beacon)), &elems,
|
sizeof(mgmt->u.beacon)), &elems,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
@ -65,9 +65,9 @@
|
||||||
|
|
||||||
--- a/src/ap/ieee802_11.h
|
--- a/src/ap/ieee802_11.h
|
||||||
+++ b/src/ap/ieee802_11.h
|
+++ b/src/ap/ieee802_11.h
|
||||||
@@ -65,4 +65,17 @@ void hostapd_tx_status(struct hostapd_da
|
@@ -77,4 +77,17 @@ u8 * hostapd_eid_time_zone(struct hostap
|
||||||
void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src,
|
int hostapd_update_time_adv(struct hostapd_data *hapd);
|
||||||
int wds);
|
void hostapd_client_poll_ok(struct hostapd_data *hapd, const u8 *addr);
|
||||||
|
|
||||||
+#ifdef CONFIG_IEEE80211N
|
+#ifdef CONFIG_IEEE80211N
|
||||||
+void hostapd_trigger_20mhz(struct hostapd_iface *iface);
|
+void hostapd_trigger_20mhz(struct hostapd_iface *iface);
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
|
|
||||||
pos += sizeof(*oper);
|
pos += sizeof(*oper);
|
||||||
|
|
||||||
@@ -265,3 +270,80 @@ void hostapd_get_ht_capab(struct hostapd
|
@@ -271,3 +276,80 @@ void hostapd_get_ht_capab(struct hostapd
|
||||||
|
|
||||||
neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
|
neg_ht_cap->ht_capabilities_info = host_to_le16(cap);
|
||||||
}
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
|
||||||
@@ -4413,8 +4413,8 @@ static int wpa_driver_nl80211_hapd_send_
|
|
||||||
pos = (u8 *) (hdr + 1);
|
|
||||||
|
|
||||||
if (qos) {
|
|
||||||
- /* add an empty QoS header if needed */
|
|
||||||
- pos[0] = 0;
|
|
||||||
+ /* Set highest priority in QoS header */
|
|
||||||
+ pos[0] = 7;
|
|
||||||
pos[1] = 0;
|
|
||||||
pos += 2;
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
--- a/src/drivers/driver_nl80211.c
|
|
||||||
+++ b/src/drivers/driver_nl80211.c
|
|
||||||
@@ -111,6 +111,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;
|
|
||||||
@@ -121,7 +122,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;
|
|
||||||
struct netlink_data *netlink;
|
|
||||||
@@ -2111,7 +2111,7 @@ wpa_driver_nl80211_finish_drv_init(struc
|
|
||||||
if (wpa_driver_nl80211_capa(drv))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
- if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
|
|
||||||
+ if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, bss->addr))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (nl80211_register_action_frames(drv) < 0) {
|
|
||||||
@@ -5650,7 +5650,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->ioctl_sock, bridge_ifname,
|
|
||||||
@@ -5878,7 +5878,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;
|
|
||||||
@@ -5893,9 +5893,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;
|
|
||||||
@@ -5996,6 +5996,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;
|
|
Loading…
Reference in New Issue