aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Beverborg <flo@beverb.org>2020-11-07 15:44:05 +0100
committerPaul Spooren <mail@aparcar.org>2021-01-03 12:31:42 -1000
commit22e568d0fe5d44246874d3300e7e714f7594c320 (patch)
tree75dcfb9ed51b583db8761d9993f7c6ccefe23eb3
parentcbccc2560c0240c2c9528e82d745b7f45ce88bbd (diff)
downloadupstream-22e568d0fe5d44246874d3300e7e714f7594c320.tar.gz
upstream-22e568d0fe5d44246874d3300e7e714f7594c320.tar.bz2
upstream-22e568d0fe5d44246874d3300e7e714f7594c320.zip
hostapd: add support for custom per-BSS options
This adds an option "hostapd_bss_options" that does the same as "hostapd_options" but on a per-BSS level, instead of a per-device level. This can be used, for example, to configure different per-devce sae_passwords per BSS or to augment some of the existing per-BSS options. Signed-off-by: Florian Beverborg <flo@beverb.org> [remove whitespace errors, bump release] Signed-off-by: Paul Spooren <mail@aparcar.org>
-rw-r--r--package/network/services/hostapd/Makefile2
-rw-r--r--package/network/services/hostapd/files/hostapd.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index deb1d565bb..f746f5455a 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostapd
-PKG_RELEASE:=20
+PKG_RELEASE:=21
PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index fc78e2fb90..80e1f7cedf 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -330,6 +330,8 @@ hostapd_common_add_bss_config() {
config_add_array airtime_sta_weight
config_add_int airtime_bss_weight airtime_bss_limit
+
+ config_add_array hostapd_bss_options
}
hostapd_set_vlan_file() {
@@ -940,6 +942,11 @@ hostapd_set_bss_options() {
json_for_each_item append_operator_icon operator_icon
fi
+ json_get_values opts hostapd_bss_options
+ for val in $opts; do
+ append bss_conf "$val" "$N"
+ done
+
bss_md5sum=$(echo $bss_conf | md5sum | cut -d" " -f1)
append bss_conf "config_id=$bss_md5sum" "$N"