mirror of https://github.com/hak5/openwrt.git
parent
0b0061e01b
commit
216556954e
|
@ -9,14 +9,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostapd
|
PKG_NAME:=hostapd
|
||||||
PKG_REV:=03ec0ec5cdb974d51a4a2a566bea4c4568138576
|
PKG_VERSION:=0.6.3
|
||||||
PKG_VERSION:=20071107_$(PKG_REV)
|
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
|
PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
|
||||||
PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||||
|
PKG_MD5SUM:=516653e8d307bd6ec4ab33ba56962ed8
|
||||||
PKG_BUILD_DEPENDS:=madwifi mac80211 libnl openssl
|
PKG_BUILD_DEPENDS:=madwifi mac80211 libnl openssl
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
|
@ -1,173 +0,0 @@
|
||||||
---
|
|
||||||
hostapd/driver.h | 8 ++++----
|
|
||||||
hostapd/driver_bsd.c | 3 ++-
|
|
||||||
hostapd/driver_devicescape.c | 6 +++---
|
|
||||||
hostapd/driver_hostap.c | 4 ++--
|
|
||||||
hostapd/driver_madwifi.c | 3 ++-
|
|
||||||
hostapd/driver_prism54.c | 3 ++-
|
|
||||||
hostapd/ieee802_11.c | 4 ++--
|
|
||||||
hostapd/ieee802_1x.c | 4 ++--
|
|
||||||
hostapd/wme.c | 6 ++++--
|
|
||||||
9 files changed, 23 insertions(+), 18 deletions(-)
|
|
||||||
|
|
||||||
--- hostap.orig/hostapd/driver.h 2007-11-14 17:30:38.000000000 +0100
|
|
||||||
+++ hostap/hostapd/driver.h 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -92,7 +92,7 @@ struct wpa_driver_ops {
|
|
||||||
int (*get_retry)(void *priv, int *short_retry, int *long_retry);
|
|
||||||
|
|
||||||
int (*sta_set_flags)(void *priv, const u8 *addr,
|
|
||||||
- int flags_or, int flags_and);
|
|
||||||
+ int total_flags, int flags_or, int flags_and);
|
|
||||||
int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
|
|
||||||
int mode);
|
|
||||||
int (*set_channel_flag)(void *priv, int mode, int chan, int flag,
|
|
||||||
@@ -427,12 +427,12 @@ hostapd_get_retry(struct hostapd_data *h
|
|
||||||
|
|
||||||
static inline int
|
|
||||||
hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
|
|
||||||
- int flags_or, int flags_and)
|
|
||||||
+ int total_flags, int flags_or, int flags_and)
|
|
||||||
{
|
|
||||||
if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
|
|
||||||
return 0;
|
|
||||||
- return hapd->driver->sta_set_flags(hapd->drv_priv, addr, flags_or,
|
|
||||||
- flags_and);
|
|
||||||
+ return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
|
|
||||||
+ flags_or, flags_and);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int
|
|
||||||
--- hostap.orig/hostapd/driver_bsd.c 2007-11-14 17:30:38.000000000 +0100
|
|
||||||
+++ hostap/hostapd/driver_bsd.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -322,7 +322,8 @@ bsd_set_sta_authorized(void *priv, const
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-bsd_sta_set_flags(void *priv, const u8 *addr, int flags_or, int flags_and)
|
|
||||||
+bsd_sta_set_flags(void *priv, const u8 *addr, int total_flags, int flags_or,
|
|
||||||
+ int flags_and)
|
|
||||||
{
|
|
||||||
/* For now, only support setting Authorized flag */
|
|
||||||
if (flags_or & WLAN_STA_AUTHORIZED)
|
|
||||||
--- hostap.orig/hostapd/driver_devicescape.c 2007-11-14 17:30:39.000000000 +0100
|
|
||||||
+++ hostap/hostapd/driver_devicescape.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -74,7 +74,7 @@ struct i802_driver_data {
|
|
||||||
#define HAPD_DECL struct hostapd_data *hapd = iface->bss[0]
|
|
||||||
|
|
||||||
static int i802_sta_set_flags(void *priv, const u8 *addr,
|
|
||||||
- int flags_or, int flags_and);
|
|
||||||
+ int total_flags, int flags_or, int flags_and);
|
|
||||||
|
|
||||||
|
|
||||||
static int hostapd_set_iface_flags(struct i802_driver_data *drv, int dev_up)
|
|
||||||
@@ -666,7 +666,7 @@ static int i802_sta_remove(void *priv, c
|
|
||||||
struct i802_driver_data *drv = priv;
|
|
||||||
struct prism2_hostapd_param param;
|
|
||||||
|
|
||||||
- i802_sta_set_flags(drv, addr, 0, ~WLAN_STA_AUTHORIZED);
|
|
||||||
+ i802_sta_set_flags(drv, addr, 0, 0, ~WLAN_STA_AUTHORIZED);
|
|
||||||
|
|
||||||
memset(¶m, 0, sizeof(param));
|
|
||||||
param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
|
|
||||||
@@ -678,7 +678,7 @@ static int i802_sta_remove(void *priv, c
|
|
||||||
|
|
||||||
|
|
||||||
static int i802_sta_set_flags(void *priv, const u8 *addr,
|
|
||||||
- int flags_or, int flags_and)
|
|
||||||
+ int total_flags, int flags_or, int flags_and)
|
|
||||||
{
|
|
||||||
struct i802_driver_data *drv = priv;
|
|
||||||
struct prism2_hostapd_param param;
|
|
||||||
--- hostap.orig/hostapd/driver_hostap.c 2007-11-14 17:30:38.000000000 +0100
|
|
||||||
+++ hostap/hostapd/driver_hostap.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -374,7 +374,7 @@ static int hostap_send_eapol(void *priv,
|
|
||||||
|
|
||||||
|
|
||||||
static int hostap_sta_set_flags(void *priv, const u8 *addr,
|
|
||||||
- int flags_or, int flags_and)
|
|
||||||
+ int total_flags, int flags_or, int flags_and)
|
|
||||||
{
|
|
||||||
struct hostap_driver_data *drv = priv;
|
|
||||||
struct prism2_hostapd_param param;
|
|
||||||
@@ -694,7 +694,7 @@ static int hostap_sta_remove(void *priv,
|
|
||||||
struct hostap_driver_data *drv = priv;
|
|
||||||
struct prism2_hostapd_param param;
|
|
||||||
|
|
||||||
- hostap_sta_set_flags(drv, addr, 0, ~WLAN_STA_AUTHORIZED);
|
|
||||||
+ hostap_sta_set_flags(drv, addr, 0, 0, ~WLAN_STA_AUTHORIZED);
|
|
||||||
|
|
||||||
memset(¶m, 0, sizeof(param));
|
|
||||||
param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
|
|
||||||
--- hostap.orig/hostapd/driver_madwifi.c 2007-11-14 17:30:38.000000000 +0100
|
|
||||||
+++ hostap/hostapd/driver_madwifi.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -410,7 +410,8 @@ madwifi_set_sta_authorized(void *priv, c
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-madwifi_sta_set_flags(void *priv, const u8 *addr, int flags_or, int flags_and)
|
|
||||||
+madwifi_sta_set_flags(void *priv, const u8 *addr, int total_flags,
|
|
||||||
+ int flags_or, int flags_and)
|
|
||||||
{
|
|
||||||
/* For now, only support setting Authorized flag */
|
|
||||||
if (flags_or & WLAN_STA_AUTHORIZED)
|
|
||||||
--- hostap.orig/hostapd/driver_prism54.c 2007-11-14 17:30:38.000000000 +0100
|
|
||||||
+++ hostap/hostapd/driver_prism54.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -187,7 +187,8 @@ static int prism54_set_sta_authorized(vo
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
-prism54_sta_set_flags(void *priv, const u8 *addr, int flags_or, int flags_and)
|
|
||||||
+prism54_sta_set_flags(void *priv, const u8 *addr, int total_flags,
|
|
||||||
+ int flags_or, int flags_and)
|
|
||||||
{
|
|
||||||
/* For now, only support setting Authorized flag */
|
|
||||||
if (flags_or & WLAN_STA_AUTHORIZED)
|
|
||||||
--- hostap.orig/hostapd/ieee802_11.c 2007-11-14 17:30:37.000000000 +0100
|
|
||||||
+++ hostap/hostapd/ieee802_11.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -1625,10 +1625,10 @@ static void handle_assoc_cb(struct hosta
|
|
||||||
ap_sta_bind_vlan(hapd, sta, 0);
|
|
||||||
}
|
|
||||||
if (sta->flags & WLAN_STA_SHORT_PREAMBLE) {
|
|
||||||
- hostapd_sta_set_flags(hapd, sta->addr,
|
|
||||||
+ hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
|
||||||
WLAN_STA_SHORT_PREAMBLE, ~0);
|
|
||||||
} else {
|
|
||||||
- hostapd_sta_set_flags(hapd, sta->addr,
|
|
||||||
+ hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
|
||||||
0, ~WLAN_STA_SHORT_PREAMBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
--- hostap.orig/hostapd/ieee802_1x.c 2007-11-14 17:30:37.000000000 +0100
|
|
||||||
+++ hostap/hostapd/ieee802_1x.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -94,13 +94,13 @@ void ieee802_1x_set_sta_authorized(struc
|
|
||||||
|
|
||||||
if (authorized) {
|
|
||||||
sta->flags |= WLAN_STA_AUTHORIZED;
|
|
||||||
- res = hostapd_sta_set_flags(hapd, sta->addr,
|
|
||||||
+ res = hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
|
||||||
WLAN_STA_AUTHORIZED, ~0);
|
|
||||||
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
|
|
||||||
HOSTAPD_LEVEL_DEBUG, "authorizing port");
|
|
||||||
} else {
|
|
||||||
sta->flags &= ~WLAN_STA_AUTHORIZED;
|
|
||||||
- res = hostapd_sta_set_flags(hapd, sta->addr,
|
|
||||||
+ res = hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
|
||||||
0, ~WLAN_STA_AUTHORIZED);
|
|
||||||
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
|
|
||||||
HOSTAPD_LEVEL_DEBUG, "unauthorizing port");
|
|
||||||
--- hostap.orig/hostapd/wme.c 2007-11-14 17:30:38.000000000 +0100
|
|
||||||
+++ hostap/hostapd/wme.c 2007-11-14 17:30:47.000000000 +0100
|
|
||||||
@@ -110,9 +110,11 @@ int hostapd_wme_sta_config(struct hostap
|
|
||||||
{
|
|
||||||
/* update kernel STA data for WME related items (WLAN_STA_WPA flag) */
|
|
||||||
if (sta->flags & WLAN_STA_WME)
|
|
||||||
- hostapd_sta_set_flags(hapd, sta->addr, WLAN_STA_WME, ~0);
|
|
||||||
+ hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
|
||||||
+ WLAN_STA_WME, ~0);
|
|
||||||
else
|
|
||||||
- hostapd_sta_set_flags(hapd, sta->addr, 0, ~WLAN_STA_WME);
|
|
||||||
+ hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
|
|
||||||
+ 0, ~WLAN_STA_WME);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,41 +0,0 @@
|
||||||
Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/Makefile
|
|
||||||
===================================================================
|
|
||||||
--- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/Makefile 2008-02-16 19:44:22.000000000 +0100
|
|
||||||
+++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/Makefile 2008-02-16 19:44:34.000000000 +0100
|
|
||||||
@@ -121,6 +121,12 @@ OBJS += driver_devicescape.o
|
|
||||||
LIBS += -lnl
|
|
||||||
endif
|
|
||||||
|
|
||||||
+ifdef CONFIG_DRIVER_NL80211
|
|
||||||
+CFLAGS += -DCONFIG_DRIVER_NL80211
|
|
||||||
+OBJS += driver_nl80211.o radiotap.o
|
|
||||||
+LIBS += -lnl
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
ifdef CONFIG_DRIVER_BSD
|
|
||||||
CFLAGS += -DCONFIG_DRIVER_BSD
|
|
||||||
OBJS += driver_bsd.o
|
|
||||||
Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/drivers.c
|
|
||||||
===================================================================
|
|
||||||
--- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/drivers.c 2007-11-16 05:08:24.000000000 +0100
|
|
||||||
+++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/drivers.c 2008-02-16 19:56:29.000000000 +0100
|
|
||||||
@@ -22,6 +22,9 @@ extern struct wpa_driver_ops wpa_driver_
|
|
||||||
/* driver_devicescape.c */
|
|
||||||
extern struct wpa_driver_ops wpa_driver_devicescape_ops;
|
|
||||||
#endif /* CONFIG_DRIVER_DEVICESCAPE */
|
|
||||||
+#ifdef CONFIG_DRIVER_NL80211
|
|
||||||
+extern struct wpa_driver_ops wpa_driver_nl80211_ops; /* driver_nl80211.c */
|
|
||||||
+#endif /* CONFIG_DRIVER_NL80211 */
|
|
||||||
#ifdef CONFIG_DRIVER_PRISM54
|
|
||||||
extern struct wpa_driver_ops wpa_driver_prism54_ops; /* driver_prism54.c */
|
|
||||||
#endif /* CONFIG_DRIVER_PRISM54 */
|
|
||||||
@@ -47,6 +50,9 @@ struct wpa_driver_ops *hostapd_drivers[]
|
|
||||||
#ifdef CONFIG_DRIVER_DEVICESCAPE
|
|
||||||
&wpa_driver_devicescape_ops,
|
|
||||||
#endif /* CONFIG_DRIVER_DEVICESCAPE */
|
|
||||||
+#ifdef CONFIG_DRIVER_NL80211
|
|
||||||
+ &wpa_driver_nl80211_ops,
|
|
||||||
+#endif /* CONFIG_DRIVER_NL80211 */
|
|
||||||
#ifdef CONFIG_DRIVER_PRISM54
|
|
||||||
&wpa_driver_prism54_ops,
|
|
||||||
#endif /* CONFIG_DRIVER_PRISM54 */
|
|
|
@ -1,7 +1,5 @@
|
||||||
Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/driver_nl80211.c
|
--- a/hostapd/driver_nl80211.c
|
||||||
===================================================================
|
+++ b/hostapd/driver_nl80211.c
|
||||||
--- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/driver_nl80211.c.orig 2008-04-09 14:03:17.000000000 +1200
|
|
||||||
+++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/driver_nl80211.c 2008-04-09 14:06:37.000000000 +1200
|
|
||||||
@@ -598,11 +598,11 @@
|
@@ -598,11 +598,11 @@
|
||||||
struct nlattr *tb[NL80211_ATTR_MAX + 1];
|
struct nlattr *tb[NL80211_ATTR_MAX + 1];
|
||||||
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
|
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
|
||||||
|
|
Loading…
Reference in New Issue