diff --git a/feeds/ucentral/ratelimit/files/usr/bin/ratelimit b/feeds/ucentral/ratelimit/files/usr/bin/ratelimit index 3e7f6c2b8..399038c2b 100755 --- a/feeds/ucentral/ratelimit/files/usr/bin/ratelimit +++ b/feeds/ucentral/ratelimit/files/usr/bin/ratelimit @@ -112,19 +112,25 @@ addiface() { local ssid - [ -d /sys/class/net/$ifb/ ] && { + [ -f /tmp/ratelimit.$iface -o -d /sys/class/net/$ifb/ ] && { return 0 } + + echo -n startup > /tmp/ratelimit.$iface sleep 2 ssid=$(ubus call network.wireless status | jsonfilter -e '@[*].interfaces[@.ifname="'"$iface"'"].config.ssid') [ -z "$ssid" ] && { + rm /tmp/ratelimit.$iface logger "ratelimit: failed to lookup ssid" exit 1 } config_load ratelimit config_foreach find_ssid rate $ssid - [ "$found" -eq 0 ] && exit 0 + [ "$found" -eq 0 ] && { + rm /tmp/ratelimit.$iface + exit 0 + } logger "ratelimit: adding new iface settings" echo -n $ssid > /tmp/ratelimit.$iface diff --git a/feeds/wifi-ax/hostapd/Makefile b/feeds/wifi-ax/hostapd/Makefile index 2142fa9a1..24638ed38 100644 --- a/feeds/wifi-ax/hostapd/Makefile +++ b/feeds/wifi-ax/hostapd/Makefile @@ -627,6 +627,7 @@ define Package/wpad/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/ $(LN) wpad $(1)/usr/sbin/hostapd $(LN) wpad $(1)/usr/sbin/wpa_supplicant + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/ endef Package/wpad-basic/install = $(Package/wpad/install) Package/wpad-basic-openssl/install = $(Package/wpad/install) diff --git a/patches/wifi/0009-hostapd-always-install-the-cli.patch b/patches/wifi/0009-hostapd-always-install-the-cli.patch new file mode 100644 index 000000000..03f558dd7 --- /dev/null +++ b/patches/wifi/0009-hostapd-always-install-the-cli.patch @@ -0,0 +1,50 @@ +From 19fc552fd925a4f6f75bbf6c7c7a2f6f98af73d8 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Tue, 15 Feb 2022 11:44:05 +0100 +Subject: [PATCH] hostapd: always install the cli + +Signed-off-by: John Crispin +--- + package/network/services/hostapd/Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile +index 584695786f..243c43551e 100644 +--- a/package/network/services/hostapd/Makefile ++++ b/package/network/services/hostapd/Makefile +@@ -428,7 +428,7 @@ define Package/hostapd-utils + SUBMENU:=WirelessAPD + TITLE:=IEEE 802.1x Authenticator (utils) + URL:=http://hostap.epitest.fi/ +- DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg))) ++# DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg))) + VARIANT:=* + endef + +@@ -620,12 +620,11 @@ Package/hostapd-mini/install = $(Package/hostapd/install) + Package/hostapd-openssl/install = $(Package/hostapd/install) + Package/hostapd-wolfssl/install = $(Package/hostapd/install) + +-ifneq ($(LOCAL_TYPE),supplicant) +- define Package/hostapd-utils/install ++define Package/hostapd-utils/install ++ abc + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/ +- endef +-endif ++endef + + define Package/wpad/install + $(call Install/hostapd,$(1)) +@@ -633,6 +632,7 @@ define Package/wpad/install + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/ + $(LN) wpad $(1)/usr/sbin/hostapd + $(LN) wpad $(1)/usr/sbin/wpa_supplicant ++ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/ + endef + Package/wpad-basic/install = $(Package/wpad/install) + Package/wpad-basic-openssl/install = $(Package/wpad/install) +-- +2.25.1 +