diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-08-08 16:04:19 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-08-08 16:04:19 +0000 |
commit | 3ea2d2bb4418c17f4e526525fc9d28466be13fa9 (patch) | |
tree | 100bb9cd87c2edf0eb14e6a754c83543d825f7e3 /package | |
parent | 602f57d51bc0feac8dae52964afaef61ce10f168 (diff) |
hostapd: update to latest version (20130707)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37738 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
24 files changed, 83 insertions, 284 deletions
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index e7150396e8..6221bbb8b2 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_VERSION:=20130630 -PKG_RELEASE:=2 -PKG_REV:=9e6a321815f924e1e42896538d639e62d7786f6a +PKG_VERSION:=20130707 +PKG_RELEASE:=1 +PKG_REV:=d2ba3d6bd9336ef8fd761a0cc7999824d4c4da41 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git diff --git a/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch b/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch index d6baddb4a8..b351534073 100644 --- a/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch +++ b/package/network/services/hostapd/patches/300-nl80211_multicall_fixes.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -751,7 +751,6 @@ nla_put_failure: +@@ -754,7 +754,6 @@ nla_put_failure: } @@ -8,7 +8,7 @@ static int nl80211_get_macaddr(struct i802_bss *bss) { struct nl_msg *msg; -@@ -773,7 +772,6 @@ nla_put_failure: +@@ -776,7 +775,6 @@ nla_put_failure: nlmsg_free(msg); return NL80211_IFTYPE_UNSPECIFIED; } @@ -16,7 +16,7 @@ static int nl80211_register_beacons(struct wpa_driver_nl80211_data *drv, -@@ -3592,6 +3590,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3613,6 +3611,7 @@ static void * wpa_driver_nl80211_init(vo drv->monitor_sock = -1; drv->eapol_tx_sock = -1; drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED; @@ -24,7 +24,7 @@ if (wpa_driver_nl80211_init_nl(drv)) { os_free(drv); -@@ -3982,31 +3981,16 @@ static int i802_set_iface_flags(struct i +@@ -4003,31 +4002,16 @@ static int i802_set_iface_flags(struct i static int @@ -47,18 +47,18 @@ dynamic_if = drv->ifindex == drv->global->if_add_ifindex; dynamic_if = dynamic_if || drv->global->if_add_wdevid_set; - drv->global->if_add_wdevid_set = 0; -- + - if (wpa_driver_nl80211_capa(drv)) - return -1; - - wpa_printf(MSG_DEBUG, "nl80211: interface %s in phy %s", - bss->ifname, drv->phyname); - +- -#ifndef HOSTAPD if (dynamic_if) nlmode = nl80211_get_ifmode(bss); -@@ -4035,7 +4019,7 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -4056,7 +4040,7 @@ wpa_driver_nl80211_finish_drv_init(struc "interface '%s' due to rfkill", bss->ifname); drv->if_disabled = 1; @@ -67,7 +67,7 @@ } else { wpa_printf(MSG_ERROR, "nl80211: Could not set " "interface '%s' UP", bss->ifname); -@@ -4045,7 +4029,30 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -4066,7 +4050,30 @@ wpa_driver_nl80211_finish_drv_init(struc netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 1, IF_OPER_DORMANT); diff --git a/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch b/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch index 7b0aeee29a..a4f9a00e00 100644 --- a/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch +++ b/package/network/services/hostapd/patches/310-multicall_bridge_fix.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -1093,6 +1093,10 @@ static void wpa_driver_nl80211_event_rtm +@@ -1095,6 +1095,10 @@ static void wpa_driver_nl80211_event_rtm return; } @@ -11,7 +11,7 @@ wpa_printf(MSG_DEBUG, "RTM_NEWLINK: operstate=%d ifi_flags=0x%x " "(%s%s%s%s)", drv->operstate, ifi->ifi_flags, -@@ -1200,6 +1204,10 @@ static void wpa_driver_nl80211_event_rtm +@@ -1202,6 +1206,10 @@ static void wpa_driver_nl80211_event_rtm attrlen = len; attr = (struct rtattr *) buf; @@ -22,7 +22,7 @@ rta_len = RTA_ALIGN(sizeof(struct rtattr)); while (RTA_OK(attr, attrlen)) { if (attr->rta_type == IFLA_IFNAME) { -@@ -3592,6 +3600,11 @@ static void * wpa_driver_nl80211_init(vo +@@ -3613,6 +3621,11 @@ static void * wpa_driver_nl80211_init(vo drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED; drv->nlmode = NL80211_IFTYPE_STATION; @@ -34,7 +34,7 @@ if (wpa_driver_nl80211_init_nl(drv)) { os_free(drv); return NULL; -@@ -8799,8 +8812,6 @@ static void *i802_init(struct hostapd_da +@@ -8845,8 +8858,6 @@ static void *i802_init(struct hostapd_da br_ifindex = 0; } diff --git a/package/network/services/hostapd/patches/400-noscan.patch b/package/network/services/hostapd/patches/400-noscan.patch index 5ecc2d287a..2c580299a5 100644 --- a/package/network/services/hostapd/patches/400-noscan.patch +++ b/package/network/services/hostapd/patches/400-noscan.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2478,6 +2478,8 @@ static int hostapd_config_fill(struct ho +@@ -2477,6 +2477,8 @@ static int hostapd_config_fill(struct ho } #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211N diff --git a/package/network/services/hostapd/patches/410-multicall.patch b/package/network/services/hostapd/patches/410-multicall.patch index 93621ffa97..62d37cb6d8 100644 --- a/package/network/services/hostapd/patches/410-multicall.patch +++ b/package/network/services/hostapd/patches/410-multicall.patch @@ -26,7 +26,7 @@ LIBS += $(DRV_AP_LIBS) ifdef CONFIG_L2_PACKET -@@ -864,6 +869,12 @@ install: all +@@ -871,6 +876,12 @@ install: all BCHECK=../src/drivers/build.hostapd @@ -39,7 +39,7 @@ hostapd: $(BCHECK) $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ -@@ -902,6 +913,12 @@ HOBJS += ../src/crypto/aes-internal.o +@@ -909,6 +920,12 @@ HOBJS += ../src/crypto/aes-internal.o HOBJS += ../src/crypto/aes-internal-enc.o endif @@ -62,7 +62,7 @@ BINALL=wpa_supplicant wpa_cli -@@ -704,6 +705,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS +@@ -720,6 +721,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS LIBS += -ldl -rdynamic endif @@ -73,7 +73,7 @@ endif ifdef CONFIG_AP -@@ -712,9 +717,11 @@ NEED_EAP_COMMON=y +@@ -728,9 +733,11 @@ NEED_EAP_COMMON=y NEED_RSN_AUTHENTICATOR=y CFLAGS += -DCONFIG_AP OBJS += ap.o @@ -85,7 +85,7 @@ OBJS += ../src/ap/hostapd.o OBJS += ../src/ap/wpa_auth_glue.o OBJS += ../src/ap/utils.o -@@ -769,10 +776,18 @@ endif +@@ -785,10 +792,18 @@ endif ifdef CONFIG_HS20 OBJS += ../src/ap/hs20.o endif @@ -104,7 +104,7 @@ NEED_AES_WRAP=y OBJS += ../src/ap/wpa_auth.o OBJS += ../src/ap/wpa_auth_ie.o -@@ -1521,6 +1536,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) +@@ -1537,6 +1552,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv) $(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config @@ -117,7 +117,7 @@ wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) @$(E) " LD " $@ -@@ -1591,6 +1612,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2. +@@ -1611,6 +1632,12 @@ eap_eke.so: ../src/eap_peer/eap_eke.c .. %@.service: %.service.arg.in sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ @@ -132,7 +132,7 @@ wpa_cli.exe: wpa_cli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -3861,8 +3861,8 @@ union wpa_event_data { +@@ -3868,8 +3868,8 @@ union wpa_event_data { * Driver wrapper code should call this function whenever an event is received * from the driver. */ @@ -179,7 +179,7 @@ for (;;) { --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -2383,8 +2383,8 @@ static void wpa_supplicant_event_unprot_ +@@ -2561,8 +2561,8 @@ static void wpas_event_deauth(struct wpa } @@ -189,10 +189,10 @@ + union wpa_event_data *data) { struct wpa_supplicant *wpa_s = ctx; - u16 reason_code = 0; + --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -3090,6 +3090,9 @@ static void wpa_supplicant_deinit_iface( +@@ -3106,6 +3106,9 @@ static void wpa_supplicant_deinit_iface( os_free(wpa_s); } @@ -202,7 +202,7 @@ /** * wpa_supplicant_add_iface - Add a new network interface -@@ -3281,6 +3284,7 @@ struct wpa_global * wpa_supplicant_init( +@@ -3297,6 +3300,7 @@ struct wpa_global * wpa_supplicant_init( wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ diff --git a/package/network/services/hostapd/patches/430-rescan_immediately.patch b/package/network/services/hostapd/patches/430-rescan_immediately.patch index bc695132cc..fc49995fa4 100644 --- a/package/network/services/hostapd/patches/430-rescan_immediately.patch +++ b/package/network/services/hostapd/patches/430-rescan_immediately.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2454,7 +2454,7 @@ static struct wpa_supplicant * wpa_suppl +@@ -2457,7 +2457,7 @@ static struct wpa_supplicant * wpa_suppl if (wpa_s == NULL) return NULL; wpa_s->scan_req = INITIAL_SCAN_REQ; diff --git a/package/network/services/hostapd/patches/440-optional_rfkill.patch b/package/network/services/hostapd/patches/440-optional_rfkill.patch index 545b6bb450..6bff863e3d 100644 --- a/package/network/services/hostapd/patches/440-optional_rfkill.patch +++ b/package/network/services/hostapd/patches/440-optional_rfkill.patch @@ -10,7 +10,7 @@ struct wpa_driver_capa capa; u8 *extended_capa, *extended_capa_mask; unsigned int extended_capa_len; -@@ -3461,7 +3463,7 @@ static int wpa_driver_nl80211_init_nl(st +@@ -3482,7 +3484,7 @@ static int wpa_driver_nl80211_init_nl(st return 0; } @@ -19,7 +19,7 @@ static void wpa_driver_nl80211_rfkill_blocked(void *ctx) { wpa_printf(MSG_DEBUG, "nl80211: RFKILL blocked"); -@@ -3484,6 +3486,7 @@ static void wpa_driver_nl80211_rfkill_un +@@ -3505,6 +3507,7 @@ static void wpa_driver_nl80211_rfkill_un } /* rtnetlink ifup handler will report interface as enabled */ } @@ -27,7 +27,7 @@ static void wpa_driver_nl80211_handle_eapol_tx_status(int sock, -@@ -3579,7 +3582,9 @@ static void * wpa_driver_nl80211_init(vo +@@ -3600,7 +3603,9 @@ static void * wpa_driver_nl80211_init(vo void *global_priv) { struct wpa_driver_nl80211_data *drv; @@ -37,7 +37,7 @@ struct i802_bss *bss; if (global_priv == NULL) -@@ -3613,6 +3618,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3634,6 +3639,7 @@ static void * wpa_driver_nl80211_init(vo if (nl80211_init_bss(bss)) goto failed; @@ -45,7 +45,7 @@ rcfg = os_zalloc(sizeof(*rcfg)); if (rcfg == NULL) goto failed; -@@ -3625,6 +3631,7 @@ static void * wpa_driver_nl80211_init(vo +@@ -3646,6 +3652,7 @@ static void * wpa_driver_nl80211_init(vo wpa_printf(MSG_DEBUG, "nl80211: RFKILL status not available"); os_free(rcfg); } @@ -53,7 +53,7 @@ if (wpa_driver_nl80211_finish_drv_init(drv)) goto failed; -@@ -3916,10 +3923,12 @@ static void nl80211_mgmt_unsubscribe(str +@@ -3937,10 +3944,12 @@ static void nl80211_mgmt_unsubscribe(str } @@ -66,7 +66,7 @@ static void nl80211_del_p2pdev(struct i802_bss *bss) -@@ -4027,13 +4036,16 @@ wpa_driver_nl80211_finish_drv_init_sta(s +@@ -4048,13 +4057,16 @@ wpa_driver_nl80211_finish_drv_init_sta(s } if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1)) { @@ -84,7 +84,7 @@ wpa_printf(MSG_ERROR, "nl80211: Could not set " "interface '%s' UP", bss->ifname); return -1; -@@ -4072,8 +4084,10 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -4093,8 +4105,10 @@ wpa_driver_nl80211_finish_drv_init(struc return -1; if (send_rfkill_event) { @@ -95,7 +95,7 @@ } return 0; -@@ -4159,7 +4173,9 @@ static void wpa_driver_nl80211_deinit(st +@@ -4180,7 +4194,9 @@ static void wpa_driver_nl80211_deinit(st netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 0, IF_OPER_UP); diff --git a/package/network/services/hostapd/patches/450-reload_freq_change.patch b/package/network/services/hostapd/patches/450-reload_freq_change.patch index 5dc2a85549..e981375692 100644 --- a/package/network/services/hostapd/patches/450-reload_freq_change.patch +++ b/package/network/services/hostapd/patches/450-reload_freq_change.patch @@ -74,7 +74,7 @@ } --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -6466,7 +6466,7 @@ static int wpa_driver_nl80211_set_freq(s +@@ -6511,7 +6511,7 @@ static int wpa_driver_nl80211_set_freq(s nl80211_cmd(drv, msg, 0, NL80211_CMD_SET_WIPHY); diff --git a/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch index b8e3cc38d1..0e33f0afaa 100644 --- a/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch +++ b/package/network/services/hostapd/patches/451-nl80211_del_beacon_bss.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4094,16 +4094,18 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -4115,16 +4115,18 @@ wpa_driver_nl80211_finish_drv_init(struc } @@ -21,7 +21,7 @@ return send_and_recv_msgs(drv, msg, NULL, NULL); nla_put_failure: -@@ -4111,6 +4113,15 @@ static int wpa_driver_nl80211_del_beacon +@@ -4132,6 +4134,15 @@ static int wpa_driver_nl80211_del_beacon return -ENOBUFS; } @@ -37,7 +37,7 @@ /** * wpa_driver_nl80211_deinit - Deinitialize nl80211 driver interface -@@ -9528,7 +9539,6 @@ static int wpa_driver_nl80211_stop_ap(vo +@@ -9575,7 +9586,6 @@ static int wpa_driver_nl80211_stop_ap(vo if (!is_ap_interface(drv->nlmode)) return -1; wpa_driver_nl80211_del_beacon(drv); diff --git a/package/network/services/hostapd/patches/453-ap_sta_support.patch b/package/network/services/hostapd/patches/453-ap_sta_support.patch index 3e3976ed25..80acbd34be 100644 --- a/package/network/services/hostapd/patches/453-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/453-ap_sta_support.patch @@ -96,7 +96,7 @@ /* Configure default/group WEP keys for static WEP */ int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) { -@@ -675,8 +717,16 @@ void wpa_supplicant_set_state(struct wpa +@@ -676,8 +718,16 @@ void wpa_supplicant_set_state(struct wpa #endif /* CONFIG_P2P */ sme_sched_obss_scan(wpa_s, 1); @@ -113,7 +113,7 @@ wpa_s->new_connection = 1; wpa_drv_set_operstate(wpa_s, 0); #ifndef IEEE8021X_EAPOL -@@ -2866,6 +2916,21 @@ static int wpa_supplicant_init_iface(str +@@ -2874,6 +2924,21 @@ static int wpa_supplicant_init_iface(str os_strlcpy(wpa_s->bridge_ifname, iface->bridge_ifname, sizeof(wpa_s->bridge_ifname)); } @@ -145,7 +145,7 @@ #include "drivers/driver.h" #include "wpa_supplicant_i.h" #include "config.h" -@@ -245,6 +246,9 @@ static void calculate_update_time(const +@@ -245,6 +246,9 @@ static void calculate_update_time(const static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src, struct os_time *fetch_time) { diff --git a/package/network/services/hostapd/patches/454-ap-sta-concurrency.patch b/package/network/services/hostapd/patches/454-ap-sta-concurrency.patch deleted file mode 100644 index f481a31544..0000000000 --- a/package/network/services/hostapd/patches/454-ap-sta-concurrency.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/hostapd/config_file.c -+++ b/hostapd/config_file.c -@@ -1781,6 +1781,8 @@ static int hostapd_config_fill(struct ho - } - } else if (os_strcmp(buf, "wds_sta") == 0) { - bss->wds_sta = atoi(pos); -+ } else if (os_strcmp(buf, "start_disabled") == 0) { -+ bss->start_disabled = atoi(pos); - } else if (os_strcmp(buf, "ap_isolate") == 0) { - bss->isolate = atoi(pos); - } else if (os_strcmp(buf, "ap_max_inactivity") == 0) { ---- a/hostapd/hostapd.conf -+++ b/hostapd/hostapd.conf -@@ -389,6 +389,9 @@ wmm_ac_vo_acm=0 - # use a separate bridge. - #wds_bridge=wds-br0 - -+# Start the AP with beaconing disabled by default. -+#start_disabled=0 -+ - # Client isolation can be used to prevent low-level bridging of frames between - # associated stations in the BSS. By default, this bridging is allowed. - #ap_isolate=1 ---- a/src/ap/ap_config.h -+++ b/src/ap/ap_config.h -@@ -243,6 +243,7 @@ struct hostapd_bss_config { - int num_deny_mac; - int wds_sta; - int isolate; -+ int start_disabled; - - int auth_algs; /* bitfield of allowed IEEE 802.11 authentication - * algorithms, WPA_AUTH_ALG_{OPEN,SHARED,LEAP} */ ---- a/src/ap/hostapd.c -+++ b/src/ap/hostapd.c -@@ -819,7 +819,8 @@ static int hostapd_setup_bss(struct host - return -1; - } - -- ieee802_11_set_beacon(hapd); -+ if (!hapd->conf->start_disabled) -+ ieee802_11_set_beacon(hapd); - - if (hapd->wpa_auth && wpa_init_keys(hapd->wpa_auth) < 0) - return -1; diff --git a/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch index f1d9334d5b..e8d8910a41 100644 --- a/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/460-disable_ctrl_iface_mib.patch @@ -43,7 +43,7 @@ reply_len = -1; --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -754,6 +754,9 @@ ifdef CONFIG_WNM +@@ -770,6 +770,9 @@ ifdef CONFIG_WNM OBJS += ../src/ap/wnm_ap.o endif ifdef CONFIG_CTRL_IFACE @@ -55,7 +55,7 @@ --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c -@@ -5186,6 +5186,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5193,6 +5193,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = -1; } else if (os_strncmp(buf, "NOTE ", 5) == 0) { wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); @@ -63,7 +63,7 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); if (reply_len >= 0) { -@@ -5197,6 +5198,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5204,6 +5205,7 @@ char * wpa_supplicant_ctrl_iface_process else reply_len += res; } @@ -71,7 +71,7 @@ } else if (os_strncmp(buf, "STATUS", 6) == 0) { reply_len = wpa_supplicant_ctrl_iface_status( wpa_s, buf + 6, reply, reply_size); -@@ -5600,6 +5602,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5607,6 +5609,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = wpa_supplicant_ctrl_iface_bss( wpa_s, buf + 4, reply, reply_size); #ifdef CONFIG_AP @@ -79,7 +79,7 @@ } else if (os_strcmp(buf, "STA-FIRST") == 0) { reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); } else if (os_strncmp(buf, "STA ", 4) == 0) { -@@ -5608,6 +5611,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -5615,6 +5618,7 @@ char * wpa_supplicant_ctrl_iface_process } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, reply_size); @@ -112,7 +112,7 @@ + --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c -@@ -2042,6 +2042,7 @@ static const char * bool_txt(Boolean boo +@@ -1939,6 +1939,7 @@ static const char * bool_txt(Boolean boo return bool ? "TRUE" : "FALSE"; } @@ -120,7 +120,7 @@ int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) { -@@ -2194,6 +2195,7 @@ int ieee802_1x_get_mib_sta(struct hostap +@@ -2091,6 +2092,7 @@ int ieee802_1x_get_mib_sta(struct hostap return len; } diff --git a/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch b/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch index a0f5458864..a8f395237c 100644 --- a/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch +++ b/package/network/services/hostapd/patches/480-terminate_on_setup_failure.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -975,11 +975,8 @@ int hostapd_setup_interface_complete(str +@@ -951,11 +951,8 @@ int hostapd_setup_interface_complete(str size_t j; u8 *prev_addr; @@ -14,7 +14,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (hapd->iconf->channel) { -@@ -999,7 +996,7 @@ int hostapd_setup_interface_complete(str +@@ -975,7 +972,7 @@ int hostapd_setup_interface_complete(str hapd->iconf->vht_oper_centr_freq_seg1_idx)) { wpa_printf(MSG_ERROR, "Could not set channel for " "kernel driver"); @@ -23,7 +23,7 @@ } } -@@ -1010,7 +1007,7 @@ int hostapd_setup_interface_complete(str +@@ -986,7 +983,7 @@ int hostapd_setup_interface_complete(str hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_WARNING, "Failed to prepare rates table."); @@ -32,7 +32,7 @@ } } -@@ -1018,14 +1015,14 @@ int hostapd_setup_interface_complete(str +@@ -994,14 +991,14 @@ int hostapd_setup_interface_complete(str hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) { wpa_printf(MSG_ERROR, "Could not set RTS threshold for " "kernel driver"); @@ -49,7 +49,7 @@ } prev_addr = hapd->own_addr; -@@ -1035,7 +1032,7 @@ int hostapd_setup_interface_complete(str +@@ -1011,7 +1008,7 @@ int hostapd_setup_interface_complete(str if (j) os_memcpy(hapd->own_addr, prev_addr, ETH_ALEN); if (hostapd_setup_bss(hapd, j == 0)) @@ -58,7 +58,7 @@ if (hostapd_mac_comp_empty(hapd->conf->bssid) == 0) prev_addr = hapd->own_addr; } -@@ -1049,7 +1046,7 @@ int hostapd_setup_interface_complete(str +@@ -1025,7 +1022,7 @@ int hostapd_setup_interface_complete(str if (hostapd_driver_commit(hapd) < 0) { wpa_printf(MSG_ERROR, "%s: Failed to commit driver " "configuration", __func__); @@ -67,7 +67,7 @@ } /* -@@ -1070,6 +1067,11 @@ int hostapd_setup_interface_complete(str +@@ -1046,6 +1043,11 @@ int hostapd_setup_interface_complete(str iface->bss[0]->conf->iface); return 0; diff --git a/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch b/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch index 21b37662c4..b6ef397b29 100644 --- a/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch +++ b/package/network/services/hostapd/patches/500-random_pool_add_kernel.patch @@ -117,7 +117,7 @@ +} --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1222,9 +1222,8 @@ endif +@@ -1238,9 +1238,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -130,7 +130,7 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk -@@ -1192,9 +1192,8 @@ endif +@@ -1208,9 +1208,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -143,7 +143,7 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/hostapd/Android.mk +++ b/hostapd/Android.mk -@@ -778,12 +778,12 @@ endif +@@ -785,12 +785,12 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL else @@ -160,7 +160,7 @@ L_CFLAGS += -DRADIUS_SERVER --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -748,12 +748,12 @@ endif +@@ -755,12 +755,12 @@ endif ifdef CONFIG_NO_RANDOM_POOL CFLAGS += -DCONFIG_NO_RANDOM_POOL else diff --git a/package/network/services/hostapd/patches/510-bring_down_interface.patch b/package/network/services/hostapd/patches/510-bring_down_interface.patch index 3cfed29862..e7520df341 100644 --- a/package/network/services/hostapd/patches/510-bring_down_interface.patch +++ b/package/network/services/hostapd/patches/510-bring_down_interface.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -8102,12 +8102,7 @@ static int wpa_driver_nl80211_set_mode(s +@@ -8145,12 +8145,7 @@ 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); @@ -14,7 +14,7 @@ break; } else wpa_printf(MSG_DEBUG, "nl80211: Failed to set " -@@ -8120,6 +8115,8 @@ static int wpa_driver_nl80211_set_mode(s +@@ -8163,6 +8158,8 @@ static int wpa_driver_nl80211_set_mode(s "interface is down"); drv->nlmode = nlmode; drv->ignore_if_down_event = 1; diff --git a/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch b/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch index 4c9fe06c3a..0ce8772c60 100644 --- a/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch +++ b/package/network/services/hostapd/patches/540-dynamic_20_40_mhz.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2490,6 +2490,10 @@ static int hostapd_config_fill(struct ho +@@ -2487,6 +2487,10 @@ static int hostapd_config_fill(struct ho "ht_capab", line); errors++; } @@ -13,7 +13,7 @@ #endif /* CONFIG_IEEE80211N */ --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -520,6 +520,7 @@ struct hostapd_config { +@@ -519,6 +519,7 @@ struct hostapd_config { int ieee80211n; int secondary_channel; int require_ht; @@ -31,7 +31,7 @@ #include "ieee802_11_auth.h" #include "vlan_init.h" #include "wpa_auth.h" -@@ -343,6 +344,7 @@ static void hostapd_cleanup_iface_pre(st +@@ -319,6 +320,7 @@ static void hostapd_cleanup_iface_pre(st static void hostapd_cleanup_iface_partial(struct hostapd_iface *iface) { diff --git a/package/network/services/hostapd/patches/550-limit_debug_messages.patch b/package/network/services/hostapd/patches/550-limit_debug_messages.patch index 7665d833e0..aaea94137f 100644 --- a/package/network/services/hostapd/patches/550-limit_debug_messages.patch +++ b/package/network/services/hostapd/patches/550-limit_debug_messages.patch @@ -165,7 +165,7 @@ /** * wpa_hexdump_ascii_key - conditional hex dump, hide keys -@@ -138,8 +173,14 @@ void wpa_hexdump_ascii(int level, const +@@ -138,8 +173,14 @@ void wpa_hexdump_ascii(int level, const * bytes per line will be shown. This works like wpa_hexdump_ascii(), but by * default, does not include secret keys (passwords, etc.) in debug output. */ diff --git a/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch index e61e85d2d8..eb0c4c2592 100644 --- a/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/601-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org> #include "common/defs.h" #define HOSTAPD_CHAN_DISABLED 0x00000001 -@@ -369,6 +370,11 @@ struct wpa_driver_associate_params { +@@ -370,6 +371,11 @@ struct wpa_driver_associate_params { */ int freq; @@ -175,7 +175,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org> #endif /* CONFIG_SSID_H */ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1599,15 +1599,24 @@ void wpa_supplicant_associate(struct wpa +@@ -1600,15 +1600,24 @@ void wpa_supplicant_associate(struct wpa params.ssid_len = ssid->ssid_len; } diff --git a/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch b/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch index 4288e9c142..a95860260b 100644 --- a/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch +++ b/package/network/services/hostapd/patches/602-driver_nl80211-use-new-parameters-during-ibss-join.patch @@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org> --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -7525,7 +7525,7 @@ static int wpa_driver_nl80211_ibss(struc +@@ -7570,7 +7570,7 @@ static int wpa_driver_nl80211_ibss(struc struct wpa_driver_associate_params *params) { struct nl_msg *msg; @@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org> int count = 0; wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex); -@@ -7558,6 +7558,37 @@ retry: +@@ -7603,6 +7603,37 @@ retry: wpa_printf(MSG_DEBUG, " * freq=%d", params->freq); NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, params->freq); diff --git a/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch b/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch index b068fa92d4..770f22a5f0 100644 --- a/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch +++ b/package/network/services/hostapd/patches/604-wpa_s-support-htmode-param.patch @@ -16,7 +16,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org> --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -374,6 +374,8 @@ struct wpa_driver_associate_params { +@@ -375,6 +375,8 @@ struct wpa_driver_associate_params { int fixed_freq; unsigned char rates[NL80211_MAX_SUPP_RATES]; int mcast_rate; @@ -27,7 +27,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org> * bg_scan_period - Background scan period in seconds, 0 to disable --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -7589,6 +7589,22 @@ retry: +@@ -7634,6 +7634,22 @@ retry: NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate); } @@ -145,7 +145,7 @@ Signed-off-by: Antonio Quartulli <ordex@autistici.org> #endif /* CONFIG_SSID_H */ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -1615,6 +1615,8 @@ void wpa_supplicant_associate(struct wpa +@@ -1616,6 +1616,8 @@ void wpa_supplicant_associate(struct wpa i++; } params.mcast_rate = ssid->mcast_rate; diff --git a/package/network/services/hostapd/patches/620-scan_wait.patch b/package/network/services/hostapd/patches/620-scan_wait.patch index 70e493a978..ea1528049c 100644 --- a/package/network/services/hostapd/patches/620-scan_wait.patch +++ b/package/network/services/hostapd/patches/620-scan_wait.patch @@ -32,7 +32,7 @@ } return hapd_iface; -@@ -437,8 +448,6 @@ static void hostapd_global_deinit(const +@@ -437,8 +448,6 @@ static void hostapd_global_deinit(const #endif /* CONFIG_NATIVE_WINDOWS */ eap_server_unregister_methods(); diff --git a/package/network/services/hostapd/patches/630-bool_fix.patch b/package/network/services/hostapd/patches/630-bool_fix.patch index 9a822be4dc..6b48006ed8 100644 --- a/package/network/services/hostapd/patches/630-bool_fix.patch +++ b/package/network/services/hostapd/patches/630-bool_fix.patch @@ -1,6 +1,6 @@ --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c -@@ -2037,9 +2037,9 @@ void ieee802_1x_notify_pre_auth(struct e +@@ -1934,9 +1934,9 @@ void ieee802_1x_notify_pre_auth(struct e } diff --git a/package/network/services/hostapd/patches/700-ubus_support.patch b/package/network/services/hostapd/patches/700-ubus_support.patch index 9fc429a5bb..8e6f6c08bc 100644 --- a/package/network/services/hostapd/patches/700-ubus_support.patch +++ b/package/network/services/hostapd/patches/700-ubus_support.patch @@ -480,7 +480,7 @@ +#endif --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -265,6 +265,7 @@ static int hostapd_broadcast_wep_set(str +@@ -241,6 +241,7 @@ static int hostapd_broadcast_wep_set(str static void hostapd_free_hapd_data(struct hostapd_data *hapd) { @@ -488,7 +488,7 @@ iapp_deinit(hapd->iapp); hapd->iapp = NULL; accounting_deinit(hapd); -@@ -830,6 +831,8 @@ static int hostapd_setup_bss(struct host +@@ -806,6 +807,8 @@ static int hostapd_setup_bss(struct host if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -497,7 +497,7 @@ return 0; } -@@ -980,6 +983,7 @@ int hostapd_setup_interface_complete(str +@@ -956,6 +959,7 @@ int hostapd_setup_interface_complete(str if (err) goto error; @@ -505,7 +505,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (hapd->iconf->channel) { iface->freq = hostapd_hw_get_freq(hapd, hapd->iconf->channel); -@@ -1072,6 +1076,7 @@ int hostapd_setup_interface_complete(str +@@ -1048,6 +1052,7 @@ int hostapd_setup_interface_complete(str error: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -513,7 +513,7 @@ eloop_terminate(); return -1; } -@@ -1170,6 +1175,8 @@ void hostapd_interface_deinit_free(struc +@@ -1146,6 +1151,8 @@ void hostapd_interface_deinit_free(struc void *drv_priv; if (iface == NULL) return; diff --git a/package/network/services/hostapd/patches/710-wds-wep-fix.patch b/package/network/services/hostapd/patches/710-wds-wep-fix.patch deleted file mode 100644 index 1411d1fc65..0000000000 --- a/package/network/services/hostapd/patches/710-wds-wep-fix.patch +++ /dev/null @@ -1,156 +0,0 @@ ---- a/src/ap/ap_drv_ops.c -+++ b/src/ap/ap_drv_ops.c -@@ -296,19 +296,19 @@ int hostapd_vlan_if_remove(struct hostap - } - - --int hostapd_set_wds_sta(struct hostapd_data *hapd, const u8 *addr, int aid, -- int val) -+int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, -+ const u8 *addr, int aid, int val) - { - const char *bridge = NULL; - - if (hapd->driver == NULL || hapd->driver->set_wds_sta == NULL) -- return 0; -+ return -1; - if (hapd->conf->wds_bridge[0]) - bridge = hapd->conf->wds_bridge; - else if (hapd->conf->bridge[0]) - bridge = hapd->conf->bridge; - return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val, -- bridge); -+ bridge, ifname_wds); - } - - ---- a/src/ap/ap_drv_ops.h -+++ b/src/ap/ap_drv_ops.h -@@ -31,8 +31,8 @@ int hostapd_set_drv_ieee8021x(struct hos - int enabled); - int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname); - int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname); --int hostapd_set_wds_sta(struct hostapd_data *hapd, const u8 *addr, int aid, -- int val); -+int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, -+ const u8 *addr, int aid, int val); - int hostapd_sta_add(struct hostapd_data *hapd, - const u8 *addr, u16 aid, u16 capability, - const u8 *supp_rates, size_t supp_rates_len, ---- a/src/ap/ieee802_11.c -+++ b/src/ap/ieee802_11.c -@@ -1846,6 +1846,29 @@ static void handle_auth_cb(struct hostap - } - } - -+static void hostapd_set_wds_encryption(struct hostapd_data *hapd, -+ struct sta_info *sta, -+ char *ifname_wds) -+{ -+ int i, idx; -+ struct hostapd_ssid *ssid = sta->ssid; -+ -+ if (hapd->conf->ieee802_1x || hapd->conf->wpa) -+ return; -+ -+ for (i = 0; i < 4; i++) { -+ if (ssid->wep.key[i] && -+ hostapd_drv_set_key(ifname_wds, hapd, WPA_ALG_WEP, NULL, i, -+ i == ssid->wep.idx, NULL, 0, -+ ssid->wep.key[i], -+ ssid->wep.len[i])) { -+ wpa_printf(MSG_WARNING, -+ "Could not set WEP keys for WDS interface; %s", -+ ifname_wds); -+ break; -+ } -+ } -+} - - static void handle_assoc_cb(struct hostapd_data *hapd, - const struct ieee80211_mgmt *mgmt, -@@ -1949,8 +1972,15 @@ static void handle_assoc_cb(struct hosta - goto fail; - } - -- if (sta->flags & WLAN_STA_WDS) -- hostapd_set_wds_sta(hapd, sta->addr, sta->aid, 1); -+ if (sta->flags & WLAN_STA_WDS) { -+ int ret; -+ char ifname_wds[IFNAMSIZ + 1]; -+ -+ ret = hostapd_set_wds_sta(hapd, ifname_wds, sta->addr, -+ sta->aid, 1); -+ if (!ret) -+ hostapd_set_wds_encryption(hapd, sta, ifname_wds); -+ } - - if (sta->eapol_sm == NULL) { - /* -@@ -2191,11 +2221,18 @@ void ieee802_11_rx_from_unknown(struct h - return; - - if (wds && !(sta->flags & WLAN_STA_WDS)) { -+ int ret; -+ char ifname_wds[IFNAMSIZ + 1]; -+ - wpa_printf(MSG_DEBUG, "Enable 4-address WDS mode for " - "STA " MACSTR " (aid %u)", - MAC2STR(sta->addr), sta->aid); - sta->flags |= WLAN_STA_WDS; -- hostapd_set_wds_sta(hapd, sta->addr, sta->aid, 1); -+ ret = hostapd_set_wds_sta(hapd, ifname_wds, -+ sta->addr, sta->aid, 1); -+ if (!ret) -+ hostapd_set_wds_encryption(hapd, sta, -+ ifname_wds); - } - return; - } ---- a/src/ap/sta_info.c -+++ b/src/ap/sta_info.c -@@ -129,7 +129,7 @@ void ap_free_sta(struct hostapd_data *ha - ap_sta_set_authorized(hapd, sta, 0); - - if (sta->flags & WLAN_STA_WDS) -- hostapd_set_wds_sta(hapd, sta->addr, sta->aid, 0); -+ hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0); - - if (!(sta->flags & WLAN_STA_PREAUTH)) - hostapd_drv_sta_remove(hapd, sta->addr); ---- a/src/drivers/driver.h -+++ b/src/drivers/driver.h -@@ -2057,10 +2057,12 @@ struct wpa_driver_ops { - * @val: 1 = bind to 4-address WDS; 0 = unbind - * @bridge_ifname: Bridge interface to use for the WDS station or %NULL - * to indicate that bridge is not to be used -+ * @ifname_wds: Buffer to return the interface name for the new WDS -+ * station. - * Returns: 0 on success, -1 on failure - */ - int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val, -- const char *bridge_ifname); -+ const char *bridge_ifname, char *ifname_wds); - - /** - * send_action - Transmit an Action frame ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -8744,13 +8744,16 @@ static int have_ifidx(struct wpa_driver_ - - - static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val, -- const char *bridge_ifname) -+ const char *bridge_ifname, char *ifname_wds) - { - struct i802_bss *bss = priv; - struct wpa_driver_nl80211_data *drv = bss->drv; - char name[IFNAMSIZ + 1]; - - os_snprintf(name, sizeof(name), "%s.sta%d", bss->ifname, aid); -+ if (ifname_wds) -+ os_strlcpy(ifname_wds, name, IFNAMSIZ + 1); -+ - wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR - " aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name); - if (val) { |