From 13b44abcffa9e3534491d413855fd0fc46e756ed Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 15 Jun 2016 17:11:43 +0200 Subject: [PATCH] hostapd: update to version 2016-06-15 Signed-off-by: Felix Fietkau --- package/network/services/hostapd/Makefile | 4 +- .../hostapd/patches/100-mesh_mode_fix.patch | 2 +- .../hostapd/patches/120-daemonize_fix.patch | 4 +- .../hostapd/patches/130-no_eapol_fix.patch | 2 +- .../hostapd/patches/200-multicall.patch | 44 ++++++++++++------- .../services/hostapd/patches/300-noscan.patch | 6 +-- .../patches/310-rescan_immediately.patch | 4 +- .../hostapd/patches/320-optional_rfkill.patch | 12 ++--- .../patches/330-nl80211_fix_set_freq.patch | 2 +- .../patches/340-reload_freq_change.patch | 4 +- .../patches/350-nl80211_del_beacon_bss.patch | 12 ++--- .../patches/360-ctrl_iface_reload.patch | 20 +++++---- .../hostapd/patches/370-ap_sta_support.patch | 4 +- .../patches/380-disable_ctrl_iface_mib.patch | 12 ++--- .../patches/390-wpa_ie_cap_workaround.patch | 4 +- .../patches/420-indicate-features.patch | 10 ++--- .../patches/430-hostapd_cli_ifdef.patch | 12 ++--- .../hostapd/patches/450-scan_wait.patch | 6 +-- ...dd-new-config-params-to-be-used-with.patch | 10 ++--- ...-use-new-parameters-during-ibss-join.patch | 4 +- .../462-wpa_s-support-htmode-param.patch | 12 ++--- .../hostapd/patches/600-ubus_support.patch | 28 ++++++------ .../hostapd/patches/700-make-make-work.patch | 12 ----- 23 files changed, 115 insertions(+), 115 deletions(-) delete mode 100644 package/network/services/hostapd/patches/700-make-make-work.patch diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 3b8ceb40b9..1b4a5d9f3a 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_VERSION:=2016-05-05 +PKG_VERSION:=2016-06-15 PKG_RELEASE:=1 -PKG_REV:=9524e7e5a4a18539f0fb532544d2de63621b5f8b +PKG_REV:=31d3692fe5d56c05753ed4a70c7943979e1d29e7 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/100-mesh_mode_fix.patch b/package/network/services/hostapd/patches/100-mesh_mode_fix.patch index 1be7559c4a..ceb4c53afa 100644 --- a/package/network/services/hostapd/patches/100-mesh_mode_fix.patch +++ b/package/network/services/hostapd/patches/100-mesh_mode_fix.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -2262,7 +2262,8 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -2332,7 +2332,8 @@ wpa_driver_nl80211_finish_drv_init(struc if (drv->hostapd || bss->static_ap) nlmode = NL80211_IFTYPE_AP; diff --git a/package/network/services/hostapd/patches/120-daemonize_fix.patch b/package/network/services/hostapd/patches/120-daemonize_fix.patch index fad84669a6..0389406a98 100644 --- a/package/network/services/hostapd/patches/120-daemonize_fix.patch +++ b/package/network/services/hostapd/patches/120-daemonize_fix.patch @@ -60,13 +60,13 @@ + if (chdir("/") < 0) return -1; - } -- + - return 0; -} -#else /* __APPLE__ */ -#define os_daemon daemon -#endif /* __APPLE__ */ - +- - -int os_daemonize(const char *pid_file) -{ diff --git a/package/network/services/hostapd/patches/130-no_eapol_fix.patch b/package/network/services/hostapd/patches/130-no_eapol_fix.patch index 0c4114a515..5aee3d07f1 100644 --- a/package/network/services/hostapd/patches/130-no_eapol_fix.patch +++ b/package/network/services/hostapd/patches/130-no_eapol_fix.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -253,9 +253,10 @@ void wpa_supplicant_cancel_auth_timeout( +@@ -257,9 +257,10 @@ void wpa_supplicant_cancel_auth_timeout( */ void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s) { diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 49e7af74d8..e9d49d40fa 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -8,7 +8,17 @@ ifndef CONFIG_NO_GITVER # Add VERSION_STR postfix for builds from a git repository -@@ -315,10 +316,14 @@ CFLAGS += -DCONFIG_MBO +@@ -190,7 +191,8 @@ endif + + ifdef CONFIG_NO_VLAN + CFLAGS += -DCONFIG_NO_VLAN +-else ++endif ++ifneq ($(findstring CONFIG_NO_VLAN,$(CFLAGS)), CONFIG_NO_VLAN) + OBJS += ../src/ap/vlan_init.o + OBJS += ../src/ap/vlan_ifconfig.o + OBJS += ../src/ap/vlan.o +@@ -315,10 +317,14 @@ CFLAGS += -DCONFIG_MBO OBJS += ../src/ap/mbo_ap.o endif @@ -26,7 +36,7 @@ LIBS += $(DRV_AP_LIBS) ifdef CONFIG_L2_PACKET -@@ -1051,6 +1056,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) +@@ -1051,6 +1057,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR) BCHECK=../src/drivers/build.hostapd @@ -39,7 +49,7 @@ hostapd: $(BCHECK) $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ -@@ -1092,6 +1103,12 @@ HOBJS += ../src/crypto/aes-internal.o +@@ -1092,6 +1104,12 @@ HOBJS += ../src/crypto/aes-internal.o HOBJS += ../src/crypto/aes-internal-enc.o endif @@ -132,7 +142,7 @@ wpa_cli.exe: wpa_cli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -4775,8 +4775,8 @@ union wpa_event_data { +@@ -4794,8 +4794,8 @@ union wpa_event_data { * Driver wrapper code should call this function whenever an event is received * from the driver. */ @@ -143,7 +153,7 @@ /** * wpa_supplicant_event_global - Report a driver event for wpa_supplicant -@@ -4788,7 +4788,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -4807,7 +4807,7 @@ void wpa_supplicant_event(void *ctx, enu * Same as wpa_supplicant_event(), but we search for the interface in * wpa_global. */ @@ -154,7 +164,7 @@ /* --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c -@@ -1144,8 +1144,8 @@ static void hostapd_event_dfs_cac_starte +@@ -1157,8 +1157,8 @@ static void hostapd_event_dfs_cac_starte #endif /* NEED_AP_MLME */ @@ -165,7 +175,7 @@ { struct hostapd_data *hapd = ctx; #ifndef CONFIG_NO_STDOUT_DEBUG -@@ -1354,7 +1354,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -1367,7 +1367,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -207,7 +217,7 @@ os_memset(&global, 0, sizeof(global)); --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -3375,8 +3375,8 @@ static void wpa_supplicant_event_assoc_a +@@ -3384,8 +3384,8 @@ static void wpa_supplicant_event_assoc_a } @@ -218,7 +228,7 @@ { struct wpa_supplicant *wpa_s = ctx; int resched; -@@ -4037,7 +4037,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -4051,7 +4051,7 @@ void wpa_supplicant_event(void *ctx, enu #endif /* CONFIG_AP */ break; case EVENT_ACS_CHANNEL_SELECTED: @@ -227,7 +237,7 @@ if (!wpa_s->ap_iface) break; hostapd_acs_channel_selected(wpa_s->ap_iface->bss[0], -@@ -4051,7 +4051,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -4065,7 +4065,7 @@ void wpa_supplicant_event(void *ctx, enu } @@ -238,7 +248,7 @@ struct wpa_supplicant *wpa_s; --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -4967,7 +4967,6 @@ struct wpa_interface * wpa_supplicant_ma +@@ -4982,7 +4982,6 @@ struct wpa_interface * wpa_supplicant_ma return NULL; } @@ -246,7 +256,7 @@ /** * wpa_supplicant_match_existing - Match existing interfaces * @global: Pointer to global data from wpa_supplicant_init() -@@ -5004,6 +5003,11 @@ static int wpa_supplicant_match_existing +@@ -5019,6 +5018,11 @@ static int wpa_supplicant_match_existing #endif /* CONFIG_MATCH_IFACE */ @@ -258,7 +268,7 @@ /** * wpa_supplicant_add_iface - Add a new network interface -@@ -5259,6 +5263,8 @@ struct wpa_global * wpa_supplicant_init( +@@ -5274,6 +5278,8 @@ struct wpa_global * wpa_supplicant_init( #ifndef CONFIG_NO_WPA_MSG wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); #endif /* CONFIG_NO_WPA_MSG */ @@ -269,8 +279,8 @@ wpa_debug_open_file(params->wpa_debug_file_path); --- a/hostapd/main.c +++ b/hostapd/main.c -@@ -526,6 +526,11 @@ static int hostapd_get_ctrl_iface_group( - return 0; +@@ -583,6 +583,11 @@ fail: + return -1; } +void hostapd_wpa_event(void *ctx, enum wpa_event_type event, @@ -281,14 +291,14 @@ #ifdef CONFIG_WPS static int gen_uuid(const char *txt_addr) -@@ -601,6 +606,8 @@ int main(int argc, char *argv[]) +@@ -660,6 +665,8 @@ int main(int argc, char *argv[]) interfaces.global_ctrl_sock = -1; dl_list_init(&interfaces.global_ctrl_dst); + wpa_supplicant_event = hostapd_wpa_event; + wpa_supplicant_event_global = hostapd_wpa_event_global; for (;;) { - c = getopt(argc, argv, "b:Bde:f:hKP:STtu:vg:G:"); + c = getopt(argc, argv, "b:Bde:f:hi:KP:STtu:vg:G:"); if (c < 0) --- a/src/drivers/drivers.c +++ b/src/drivers/drivers.c diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch index 85dc0c1cce..bb3d57b0ea 100644 --- a/package/network/services/hostapd/patches/300-noscan.patch +++ b/package/network/services/hostapd/patches/300-noscan.patch @@ -1,6 +1,6 @@ --- a/hostapd/config_file.c +++ b/hostapd/config_file.c -@@ -2852,6 +2852,10 @@ static int hostapd_config_fill(struct ho +@@ -2861,6 +2861,10 @@ static int hostapd_config_fill(struct ho } #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_IEEE80211N @@ -13,7 +13,7 @@ } else if (os_strcmp(buf, "ht_capab") == 0) { --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h -@@ -639,6 +639,8 @@ struct hostapd_config { +@@ -655,6 +655,8 @@ struct hostapd_config { int ht_op_mode_fixed; u16 ht_capab; @@ -24,7 +24,7 @@ int no_pri_sec_switch; --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c -@@ -473,7 +473,8 @@ static int ieee80211n_check_40mhz(struct +@@ -474,7 +474,8 @@ static int ieee80211n_check_40mhz(struct int ret; /* Check that HT40 is used and PRI / SEC switch is allowed */ diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch index 3bcdd70e75..d9486ed405 100644 --- a/package/network/services/hostapd/patches/310-rescan_immediately.patch +++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch @@ -1,6 +1,6 @@ --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -3449,7 +3449,7 @@ wpa_supplicant_alloc(struct wpa_supplica +@@ -3548,7 +3548,7 @@ wpa_supplicant_alloc(struct wpa_supplica if (wpa_s == NULL) return NULL; wpa_s->scan_req = INITIAL_SCAN_REQ; @@ -8,4 +8,4 @@ + wpa_s->scan_interval = 1; wpa_s->new_connection = 1; wpa_s->parent = parent ? parent : wpa_s; - wpa_s->sched_scanning = 0; + wpa_s->p2pdev = wpa_s->parent; diff --git a/package/network/services/hostapd/patches/320-optional_rfkill.patch b/package/network/services/hostapd/patches/320-optional_rfkill.patch index 349af030b9..cf2a2c108b 100644 --- a/package/network/services/hostapd/patches/320-optional_rfkill.patch +++ b/package/network/services/hostapd/patches/320-optional_rfkill.patch @@ -1,14 +1,14 @@ --- a/src/drivers/drivers.mak +++ b/src/drivers/drivers.mak -@@ -37,7 +37,6 @@ NEED_SME=y +@@ -36,7 +36,6 @@ NEED_SME=y NEED_AP_MLME=y NEED_NETLINK=y NEED_LINUX_IOCTL=y -NEED_RFKILL=y + NEED_RADIOTAP=y ifdef CONFIG_LIBNL32 - DRV_LIBS += -lnl-3 -@@ -121,7 +120,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT +@@ -123,7 +122,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT CONFIG_WIRELESS_EXTENSION=y NEED_NETLINK=y NEED_LINUX_IOCTL=y @@ -16,7 +16,7 @@ endif ifdef CONFIG_DRIVER_NDIS -@@ -147,7 +145,6 @@ endif +@@ -149,7 +147,6 @@ endif ifdef CONFIG_WIRELESS_EXTENSION DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION DRV_WPA_OBJS += ../src/drivers/driver_wext.o @@ -24,14 +24,14 @@ endif ifdef NEED_NETLINK -@@ -160,6 +157,7 @@ endif +@@ -162,6 +159,7 @@ endif ifdef NEED_RFKILL DRV_OBJS += ../src/drivers/rfkill.o +DRV_WPA_CFLAGS += -DCONFIG_RFKILL endif - ifdef CONFIG_VLAN_NETLINK + ifdef NEED_RADIOTAP --- a/src/drivers/rfkill.h +++ b/src/drivers/rfkill.h @@ -18,8 +18,24 @@ struct rfkill_config { diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch index 54dec31333..ca4601247b 100644 --- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch +++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -3709,7 +3709,7 @@ static int nl80211_set_channel(struct i8 +@@ -3795,7 +3795,7 @@ static int nl80211_set_channel(struct i8 freq->freq, freq->ht_enabled, freq->vht_enabled, freq->bandwidth, freq->center_freq1, freq->center_freq2); diff --git a/package/network/services/hostapd/patches/340-reload_freq_change.patch b/package/network/services/hostapd/patches/340-reload_freq_change.patch index a687a805fc..086ade9ced 100644 --- a/package/network/services/hostapd/patches/340-reload_freq_change.patch +++ b/package/network/services/hostapd/patches/340-reload_freq_change.patch @@ -1,6 +1,6 @@ --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -78,6 +78,16 @@ static void hostapd_reload_bss(struct ho +@@ -80,6 +80,16 @@ static void hostapd_reload_bss(struct ho #endif /* CONFIG_NO_RADIUS */ ssid = &hapd->conf->ssid; @@ -17,7 +17,7 @@ if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next && ssid->wpa_passphrase_set && ssid->wpa_passphrase) { /* -@@ -177,21 +187,12 @@ int hostapd_reload_config(struct hostapd +@@ -179,21 +189,12 @@ int hostapd_reload_config(struct hostapd oldconf = hapd->iconf; iface->conf = newconf; diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch index 2bcf49a7c6..247f154e30 100644 --- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch +++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch @@ -1,6 +1,6 @@ --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -2324,13 +2324,18 @@ wpa_driver_nl80211_finish_drv_init(struc +@@ -2394,13 +2394,18 @@ wpa_driver_nl80211_finish_drv_init(struc } @@ -22,7 +22,7 @@ return send_and_recv_msgs(drv, msg, NULL, NULL); } -@@ -2381,7 +2386,7 @@ static void wpa_driver_nl80211_deinit(st +@@ -2452,7 +2457,7 @@ static void wpa_driver_nl80211_deinit(st nl80211_remove_monitor_interface(drv); if (is_ap_interface(drv->nlmode)) @@ -31,7 +31,7 @@ if (drv->eapol_sock >= 0) { eloop_unregister_read_sock(drv->eapol_sock); -@@ -4233,8 +4238,7 @@ static void nl80211_teardown_ap(struct i +@@ -4385,8 +4390,7 @@ static void nl80211_teardown_ap(struct i nl80211_remove_monitor_interface(drv); else nl80211_mgmt_unsubscribe(bss, "AP teardown"); @@ -41,7 +41,7 @@ } -@@ -6165,8 +6169,6 @@ static int wpa_driver_nl80211_if_remove( +@@ -6387,8 +6391,6 @@ static int wpa_driver_nl80211_if_remove( } else { wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context"); nl80211_teardown_ap(bss); @@ -50,7 +50,7 @@ nl80211_destroy_bss(bss); if (!bss->added_if) i802_set_iface_flags(bss, 0); -@@ -6528,8 +6530,7 @@ static int wpa_driver_nl80211_deinit_ap( +@@ -6750,8 +6752,7 @@ static int wpa_driver_nl80211_deinit_ap( struct wpa_driver_nl80211_data *drv = bss->drv; if (!is_ap_interface(drv->nlmode)) return -1; @@ -60,7 +60,7 @@ /* * If the P2P GO interface was dynamically added, then it is -@@ -6548,8 +6549,7 @@ static int wpa_driver_nl80211_stop_ap(vo +@@ -6770,8 +6771,7 @@ static int wpa_driver_nl80211_stop_ap(vo struct wpa_driver_nl80211_data *drv = bss->drv; if (!is_ap_interface(drv->nlmode)) return -1; diff --git a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch index ebc63ab246..1e405cbf0e 100644 --- a/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch +++ b/package/network/services/hostapd/patches/360-ctrl_iface_reload.patch @@ -1,6 +1,6 @@ --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c -@@ -47,6 +47,7 @@ +@@ -54,6 +54,7 @@ #include "fst/fst_ctrl_iface.h" #include "config_file.h" #include "ctrl_iface.h" @@ -8,15 +8,15 @@ #define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256 -@@ -59,6 +60,7 @@ struct wpa_ctrl_dst { - int errors; - }; +@@ -72,6 +73,7 @@ static void hostapd_ctrl_iface_send(stru + enum wpa_msg_type type, + const char *buf, size_t len); +static char *reload_opts = NULL; - static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level, - enum wpa_msg_type type, -@@ -169,6 +171,61 @@ static int hostapd_ctrl_iface_new_sta(st + static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd, + struct sockaddr_storage *from, +@@ -123,6 +125,61 @@ static int hostapd_ctrl_iface_new_sta(st return 0; } @@ -78,7 +78,7 @@ #ifdef CONFIG_IEEE80211W #ifdef NEED_AP_MLME -@@ -2257,6 +2314,8 @@ static int hostapd_ctrl_iface_receive_pr +@@ -2483,6 +2540,8 @@ static int hostapd_ctrl_iface_receive_pr } else if (os_strncmp(buf, "VENDOR ", 7) == 0) { reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply, reply_size); @@ -89,7 +89,7 @@ #ifdef RADIUS_SERVER --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c -@@ -552,5 +552,11 @@ int hostapd_parse_csa_settings(const cha +@@ -593,7 +593,13 @@ int hostapd_parse_csa_settings(const cha int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd) { @@ -102,3 +102,5 @@ + + return 0; } + + diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch b/package/network/services/hostapd/patches/370-ap_sta_support.patch index 04c52a2b5c..6b70215c43 100644 --- a/package/network/services/hostapd/patches/370-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch @@ -114,7 +114,7 @@ wpa_s->new_connection = 1; wpa_drv_set_operstate(wpa_s, 0); #ifndef IEEE8021X_EAPOL -@@ -4623,6 +4676,20 @@ static int wpa_supplicant_init_iface(str +@@ -4638,6 +4691,20 @@ static int wpa_supplicant_init_iface(str sizeof(wpa_s->bridge_ifname)); } @@ -135,7 +135,7 @@ /* RSNA Supplicant Key Management - INITIALIZE */ eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, FALSE); -@@ -4914,6 +4981,11 @@ static void wpa_supplicant_deinit_iface( +@@ -4929,6 +4996,11 @@ static void wpa_supplicant_deinit_iface( if (terminate) wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING); diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch index 282577e639..ef9c9db9a5 100644 --- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -211,6 +211,9 @@ endif +@@ -212,6 +212,9 @@ endif ifdef CONFIG_NO_CTRL_IFACE CFLAGS += -DCONFIG_NO_CTRL_IFACE else @@ -51,7 +51,7 @@ if (wpa_s->ap_iface) { pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, end - pos, -@@ -8610,6 +8610,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -8687,6 +8687,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); @@ -59,7 +59,7 @@ } else if (os_strcmp(buf, "MIB") == 0) { reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); if (reply_len >= 0) { -@@ -8617,6 +8618,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -8694,6 +8695,7 @@ char * wpa_supplicant_ctrl_iface_process reply + reply_len, reply_size - reply_len); } @@ -67,7 +67,7 @@ } else if (os_strncmp(buf, "STATUS", 6) == 0) { reply_len = wpa_supplicant_ctrl_iface_status( wpa_s, buf + 6, reply, reply_size); -@@ -9087,6 +9089,7 @@ char * wpa_supplicant_ctrl_iface_process +@@ -9164,6 +9166,7 @@ char * wpa_supplicant_ctrl_iface_process reply_len = wpa_supplicant_ctrl_iface_bss( wpa_s, buf + 4, reply, reply_size); #ifdef CONFIG_AP @@ -75,7 +75,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) { -@@ -9095,12 +9098,15 @@ char * wpa_supplicant_ctrl_iface_process +@@ -9172,12 +9175,15 @@ 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); @@ -167,7 +167,7 @@ --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c -@@ -1103,7 +1103,7 @@ int wpas_ap_wps_nfc_report_handover(stru +@@ -1114,7 +1114,7 @@ int wpas_ap_wps_nfc_report_handover(stru #endif /* CONFIG_WPS */ diff --git a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch index 0d752b0508..c9e7bf4209 100644 --- a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch +++ b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch @@ -1,6 +1,6 @@ --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c -@@ -1242,6 +1242,31 @@ u32 wpa_akm_to_suite(int akm) +@@ -1244,6 +1244,31 @@ u32 wpa_akm_to_suite(int akm) } @@ -32,7 +32,7 @@ int wpa_compare_rsn_ie(int ft_initial_assoc, const u8 *ie1, size_t ie1len, const u8 *ie2, size_t ie2len) -@@ -1249,8 +1274,19 @@ int wpa_compare_rsn_ie(int ft_initial_as +@@ -1251,8 +1276,19 @@ int wpa_compare_rsn_ie(int ft_initial_as if (ie1 == NULL || ie2 == NULL) return -1; diff --git a/package/network/services/hostapd/patches/420-indicate-features.patch b/package/network/services/hostapd/patches/420-indicate-features.patch index f2dff789ed..335e71eb51 100644 --- a/package/network/services/hostapd/patches/420-indicate-features.patch +++ b/package/network/services/hostapd/patches/420-indicate-features.patch @@ -8,16 +8,16 @@ #include "crypto/random.h" #include "crypto/tls.h" #include "common/version.h" -@@ -606,7 +607,7 @@ int main(int argc, char *argv[]) - +@@ -668,7 +669,7 @@ int main(int argc, char *argv[]) wpa_supplicant_event = hostapd_wpa_event; + wpa_supplicant_event_global = hostapd_wpa_event_global; for (;;) { -- c = getopt(argc, argv, "b:Bde:f:hKP:STtu:vg:G:"); -+ c = getopt(argc, argv, "b:Bde:f:hKP:STtu:g:G:v::"); +- c = getopt(argc, argv, "b:Bde:f:hi:KP:STtu:vg:G:"); ++ c = getopt(argc, argv, "b:Bde:f:hi:KP:STtu:g:G:v::"); if (c < 0) break; switch (c) { -@@ -643,6 +644,8 @@ int main(int argc, char *argv[]) +@@ -705,6 +706,8 @@ int main(int argc, char *argv[]) break; #endif /* CONFIG_DEBUG_LINUX_TRACING */ case 'v': diff --git a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch index 9ecd78609b..d07b747c3d 100644 --- a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch +++ b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch @@ -1,6 +1,6 @@ --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c -@@ -68,7 +68,6 @@ static const char *const commands_help = +@@ -69,7 +69,6 @@ static const char *const commands_help = #ifdef CONFIG_IEEE80211W " sa_query send SA Query to a station\n" #endif /* CONFIG_IEEE80211W */ @@ -8,7 +8,7 @@ " wps_pin [timeout] [addr] add WPS Enrollee PIN\n" " wps_check_pin verify PIN checksum\n" " wps_pbc indicate button pushed to initiate PBC\n" -@@ -81,7 +80,6 @@ static const char *const commands_help = +@@ -82,7 +81,6 @@ static const char *const commands_help = " wps_ap_pin [params..] enable/disable AP PIN\n" " wps_config configure AP\n" " wps_get_status show current WPS status\n" @@ -16,7 +16,7 @@ " get_config show current configuration\n" " help show this usage help\n" " interface [ifname] show interfaces/select interface\n" -@@ -364,7 +362,6 @@ static int hostapd_cli_cmd_sa_query(stru +@@ -418,7 +416,6 @@ static int hostapd_cli_cmd_sa_query(stru #endif /* CONFIG_IEEE80211W */ @@ -24,7 +24,7 @@ static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) { -@@ -590,7 +587,6 @@ static int hostapd_cli_cmd_wps_config(st +@@ -644,7 +641,6 @@ static int hostapd_cli_cmd_wps_config(st ssid_hex, argv[1]); return wpa_ctrl_command(ctrl, buf); } @@ -32,7 +32,7 @@ static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc, -@@ -1086,7 +1082,6 @@ static const struct hostapd_cli_cmd host +@@ -1236,7 +1232,6 @@ static const struct hostapd_cli_cmd host #ifdef CONFIG_IEEE80211W { "sa_query", hostapd_cli_cmd_sa_query }, #endif /* CONFIG_IEEE80211W */ @@ -40,7 +40,7 @@ { "wps_pin", hostapd_cli_cmd_wps_pin }, { "wps_check_pin", hostapd_cli_cmd_wps_check_pin }, { "wps_pbc", hostapd_cli_cmd_wps_pbc }, -@@ -1100,7 +1095,6 @@ static const struct hostapd_cli_cmd host +@@ -1250,7 +1245,6 @@ static const struct hostapd_cli_cmd host { "wps_ap_pin", hostapd_cli_cmd_wps_ap_pin }, { "wps_config", hostapd_cli_cmd_wps_config }, { "wps_get_status", hostapd_cli_cmd_wps_get_status }, diff --git a/package/network/services/hostapd/patches/450-scan_wait.patch b/package/network/services/hostapd/patches/450-scan_wait.patch index 3a787e324e..78cf3064fa 100644 --- a/package/network/services/hostapd/patches/450-scan_wait.patch +++ b/package/network/services/hostapd/patches/450-scan_wait.patch @@ -33,7 +33,7 @@ /* Initialize the driver interface */ if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5])) b = NULL; -@@ -383,8 +395,6 @@ static void hostapd_global_deinit(const +@@ -401,8 +413,6 @@ static void hostapd_global_deinit(const #endif /* CONFIG_NATIVE_WINDOWS */ eap_server_unregister_methods(); @@ -42,7 +42,7 @@ } -@@ -410,18 +420,6 @@ static int hostapd_global_run(struct hap +@@ -428,18 +438,6 @@ static int hostapd_global_run(struct hap } #endif /* EAP_SERVER_TNC */ @@ -61,7 +61,7 @@ eloop_run(); return 0; -@@ -579,8 +577,7 @@ int main(int argc, char *argv[]) +@@ -638,8 +636,7 @@ int main(int argc, char *argv[]) struct hapd_interfaces interfaces; int ret = 1; size_t i, j; diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch index 426ffc5148..ec84b9a4b2 100644 --- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli #include "common/defs.h" #include "common/ieee802_11_defs.h" #include "utils/list.h" -@@ -570,6 +571,9 @@ struct wpa_driver_associate_params { +@@ -587,6 +588,9 @@ struct wpa_driver_associate_params { * responsible for selecting with which BSS to associate. */ const u8 *bssid; @@ -42,7 +42,7 @@ Signed-hostap: Antonio Quartulli #include "config.h" -@@ -1742,6 +1743,97 @@ static char * wpa_config_write_mesh_basi +@@ -1816,6 +1817,97 @@ static char * wpa_config_write_mesh_basi #endif /* CONFIG_MESH */ @@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli /* Helper macros for network block parser */ #ifdef OFFSET -@@ -1973,6 +2065,9 @@ static const struct parse_data ssid_fiel +@@ -2047,6 +2139,9 @@ static const struct parse_data ssid_fiel { INT(ap_max_inactivity) }, { INT(dtim_period) }, { INT(beacon_int) }, @@ -160,7 +160,7 @@ Signed-hostap: Antonio Quartulli #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) -@@ -698,6 +699,9 @@ struct wpa_ssid { +@@ -711,6 +712,9 @@ struct wpa_ssid { */ void *parent_cred; @@ -172,7 +172,7 @@ Signed-hostap: Antonio Quartulli * macsec_policy - Determines the policy for MACsec secure session --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2421,6 +2421,13 @@ static void wpas_start_assoc_cb(struct w +@@ -2510,6 +2510,13 @@ static void wpas_start_assoc_cb(struct w params.beacon_int = ssid->beacon_int; else params.beacon_int = wpa_s->conf->beacon_int; diff --git a/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch b/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch index febbd14e21..459bdb944a 100644 --- a/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch +++ b/package/network/services/hostapd/patches/461-driver_nl80211-use-new-parameters-during-ibss-join.patch @@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4492,7 +4492,7 @@ static int wpa_driver_nl80211_ibss(struc +@@ -4644,7 +4644,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 int count = 0; wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex); -@@ -4519,6 +4519,37 @@ retry: +@@ -4671,6 +4671,37 @@ retry: nl80211_put_beacon_int(msg, params->beacon_int)) goto fail; diff --git a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch index aa2ac197e8..e2bd37d7a5 100644 --- a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch +++ b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch @@ -16,7 +16,7 @@ Signed-off-by: Antonio Quartulli --- a/src/drivers/driver.h +++ b/src/drivers/driver.h -@@ -573,6 +573,8 @@ struct wpa_driver_associate_params { +@@ -590,6 +590,8 @@ struct wpa_driver_associate_params { unsigned char rates[NL80211_MAX_SUPP_RATES]; int mcast_rate; @@ -27,7 +27,7 @@ Signed-off-by: Antonio Quartulli * bssid_hint - BSSID of a proposed AP --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4550,6 +4550,22 @@ retry: +@@ -4702,6 +4702,22 @@ retry: nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate); } @@ -52,7 +52,7 @@ Signed-off-by: Antonio Quartulli goto fail; --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c -@@ -1774,6 +1774,71 @@ static char * wpa_config_write_mcast_rat +@@ -1848,6 +1848,71 @@ static char * wpa_config_write_mcast_rat } #endif /* NO_CONFIG_WRITE */ @@ -124,7 +124,7 @@ Signed-off-by: Antonio Quartulli static int wpa_config_parse_rates(const struct parse_data *data, struct wpa_ssid *ssid, int line, const char *value) -@@ -2068,6 +2133,7 @@ static const struct parse_data ssid_fiel +@@ -2142,6 +2207,7 @@ static const struct parse_data ssid_fiel { INT_RANGE(fixed_freq, 0, 1) }, { FUNC(rates) }, { FUNC(mcast_rate) }, @@ -134,7 +134,7 @@ Signed-off-by: Antonio Quartulli #endif /* CONFIG_MACSEC */ --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h -@@ -701,6 +701,8 @@ struct wpa_ssid { +@@ -714,6 +714,8 @@ struct wpa_ssid { unsigned char rates[NL80211_MAX_SUPP_RATES]; double mcast_rate; @@ -145,7 +145,7 @@ Signed-off-by: Antonio Quartulli /** --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2428,6 +2428,8 @@ static void wpas_start_assoc_cb(struct w +@@ -2517,6 +2517,8 @@ static void wpas_start_assoc_cb(struct w i++; } params.mcast_rate = ssid->mcast_rate; diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 5936ef47fd..feacdf2c08 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -22,7 +22,7 @@ struct wpa_ctrl_dst; struct radius_server_data; -@@ -117,6 +118,7 @@ struct hostapd_data { +@@ -118,6 +119,7 @@ struct hostapd_data { struct hostapd_iface *iface; struct hostapd_config *iconf; struct hostapd_bss_config *conf; @@ -30,7 +30,7 @@ int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -322,6 +324,8 @@ struct hostapd_iface { +@@ -323,6 +325,8 @@ struct hostapd_iface { struct hostapd_config *conf; char phy[16]; /* Name of the PHY (radio) */ @@ -661,7 +661,7 @@ +#endif --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -282,6 +282,7 @@ static void hostapd_free_hapd_data(struc +@@ -284,6 +284,7 @@ static void hostapd_free_hapd_data(struc hapd->started = 0; wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); @@ -669,7 +669,7 @@ iapp_deinit(hapd->iapp); hapd->iapp = NULL; accounting_deinit(hapd); -@@ -1137,6 +1138,8 @@ static int hostapd_setup_bss(struct host +@@ -1139,6 +1140,8 @@ static int hostapd_setup_bss(struct host if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -678,7 +678,7 @@ return 0; } -@@ -1662,6 +1665,7 @@ static int hostapd_setup_interface_compl +@@ -1664,6 +1667,7 @@ static int hostapd_setup_interface_compl if (err) goto fail; @@ -686,7 +686,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (iface->conf->channel) { #ifdef NEED_AP_MLME -@@ -1842,6 +1846,7 @@ dfs_offload: +@@ -1844,6 +1848,7 @@ dfs_offload: fail: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -694,7 +694,7 @@ hostapd_set_state(iface, HAPD_IFACE_DISABLED); wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED); #ifdef CONFIG_FST -@@ -2268,6 +2273,7 @@ void hostapd_interface_deinit_free(struc +@@ -2277,6 +2282,7 @@ void hostapd_interface_deinit_free(struc (unsigned int) iface->conf->num_bss); driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; @@ -704,7 +704,7 @@ __func__, driver, drv_priv); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -929,7 +929,8 @@ int auth_sae_init_committed(struct hosta +@@ -980,7 +980,8 @@ int auth_sae_init_committed(struct hosta static void handle_auth(struct hostapd_data *hapd, @@ -714,7 +714,7 @@ { u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; -@@ -945,6 +946,11 @@ static void handle_auth(struct hostapd_d +@@ -996,6 +997,11 @@ static void handle_auth(struct hostapd_d char *identity = NULL; char *radius_cui = NULL; u16 seq_ctrl; @@ -726,7 +726,7 @@ os_memset(&vlan_id, 0, sizeof(vlan_id)); -@@ -1098,6 +1104,14 @@ static void handle_auth(struct hostapd_d +@@ -1149,6 +1155,14 @@ static void handle_auth(struct hostapd_d resp = WLAN_STATUS_UNSPECIFIED_FAILURE; goto fail; } @@ -741,7 +741,7 @@ if (res == HOSTAPD_ACL_PENDING) { wpa_printf(MSG_DEBUG, "Authentication frame from " MACSTR " waiting for an external authentication", -@@ -1982,13 +1996,18 @@ static u16 send_assoc_resp(struct hostap +@@ -2033,13 +2047,18 @@ static u16 send_assoc_resp(struct hostap static void handle_assoc(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, @@ -761,7 +761,7 @@ if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) : sizeof(mgmt->u.assoc_req))) { -@@ -2108,6 +2127,13 @@ static void handle_assoc(struct hostapd_ +@@ -2159,6 +2178,13 @@ static void handle_assoc(struct hostapd_ } #endif /* CONFIG_MBO */ @@ -775,7 +775,7 @@ /* * sta->capability is used in check_assoc_ies() for RRM enabled * capability element. -@@ -2588,7 +2614,7 @@ int ieee802_11_mgmt(struct hostapd_data +@@ -2639,7 +2665,7 @@ int ieee802_11_mgmt(struct hostapd_data if (stype == WLAN_FC_STYPE_PROBE_REQ) { @@ -784,7 +784,7 @@ return 1; } -@@ -2606,17 +2632,17 @@ int ieee802_11_mgmt(struct hostapd_data +@@ -2657,17 +2683,17 @@ int ieee802_11_mgmt(struct hostapd_data switch (stype) { case WLAN_FC_STYPE_AUTH: wpa_printf(MSG_DEBUG, "mgmt::auth"); diff --git a/package/network/services/hostapd/patches/700-make-make-work.patch b/package/network/services/hostapd/patches/700-make-make-work.patch deleted file mode 100644 index 643061ab5b..0000000000 --- a/package/network/services/hostapd/patches/700-make-make-work.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/hostapd/Makefile -+++ b/hostapd/Makefile -@@ -196,7 +196,8 @@ endif - - ifdef CONFIG_NO_VLAN - CFLAGS += -DCONFIG_NO_VLAN --else -+endif -+ifneq ($(findstring CONFIG_NO_VLAN,$(CFLAGS)), CONFIG_NO_VLAN) - OBJS += ../src/ap/vlan_init.o - OBJS += ../src/ap/vlan_ifconfig.o - OBJS += ../src/ap/vlan.o -- 2.30.2