mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 01:22:25 +00:00
* update base 21.02 revision * update v5.10 support * fix captive portal * cleanup ucentral-* packages * update ucentral-* packages * cleanup profiles * fix worflow Signed-off-by: John Crispin <john@phrozen.org>
258 lines
10 KiB
Diff
258 lines
10 KiB
Diff
From 0bdafa77ec675b81d9254cb4ce429e76ca84fcea Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Thu, 1 Apr 2021 09:31:19 +0200
|
|
Subject: [PATCH 1/2] hostapd: add a pile of new options
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
.../network/services/hostapd/files/hostapd.sh | 84 +++++++++++++------
|
|
1 file changed, 60 insertions(+), 24 deletions(-)
|
|
|
|
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
|
|
index 45a49b8faa..05b901fb6b 100644
|
|
--- a/package/network/services/hostapd/files/hostapd.sh
|
|
+++ b/package/network/services/hostapd/files/hostapd.sh
|
|
@@ -311,12 +311,12 @@ hostapd_common_add_bss_config() {
|
|
|
|
config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string'
|
|
|
|
- config_add_boolean iw_enabled iw_internet iw_asra iw_esr iw_uesa
|
|
+ config_add_boolean interworking iw_internet iw_asra iw_esr iw_uesa
|
|
config_add_int iw_access_network_type iw_venue_group iw_venue_type
|
|
config_add_int iw_ipaddr_type_availability iw_gas_address3
|
|
config_add_string iw_hessid iw_network_auth_type iw_qos_map_set
|
|
config_add_array iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm
|
|
- config_add_array iw_anqp_elem
|
|
+ config_add_array iw_anqp_elem iw_venue_name iw_venue_url
|
|
|
|
config_add_boolean hs20 disable_dgaf osen
|
|
config_add_int anqp_domain_id
|
|
@@ -327,12 +327,20 @@ hostapd_common_add_bss_config() {
|
|
config_add_array hs20_conn_capab
|
|
config_add_string osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
|
|
|
|
+ config_add_boolean interworking
|
|
+ config_add_string hs20_t_c_server_url
|
|
+
|
|
config_add_array airtime_sta_weight
|
|
config_add_int airtime_bss_weight airtime_bss_limit
|
|
|
|
config_add_boolean multicast_to_unicast per_sta_vif
|
|
|
|
config_add_array hostapd_bss_options
|
|
+
|
|
+ config_add_boolean request_cui
|
|
+ config_add_array radius_auth_req_attr
|
|
+ config_add_array radius_acct_req_attr
|
|
+ config_add_int rts_threshold
|
|
}
|
|
|
|
hostapd_set_vlan_file() {
|
|
@@ -396,12 +404,20 @@ append_iw_nai_realm() {
|
|
[ -n "$1" ] && append bss_conf "nai_realm=$1" "$N"
|
|
}
|
|
|
|
+append_iw_venue_name() {
|
|
+ [ -n "$1" ] && append bss_conf "venue_name=$1" "$N"
|
|
+}
|
|
+
|
|
+append_iw_venue_url() {
|
|
+ [ -n "$1" ] && append bss_conf "venue_url=$1" "$N"
|
|
+}
|
|
+
|
|
append_hs20_oper_friendly_name() {
|
|
- append bss_conf "hs20_oper_friendly_name=$1" "$N"
|
|
+ [ -n "$1" ] && append bss_conf "hs20_oper_friendly_name=$1" "$N"
|
|
}
|
|
|
|
append_osu_provider_service_desc() {
|
|
- append bss_conf "osu_service_desc=$1" "$N"
|
|
+ [ -n "$1" ] && append bss_conf "osu_service_desc=$1" "$N"
|
|
}
|
|
|
|
append_hs20_icon() {
|
|
@@ -421,15 +437,15 @@ append_hs20_icons() {
|
|
}
|
|
|
|
append_operator_icon() {
|
|
- append bss_conf "operator_icon=$1" "$N"
|
|
+ [ -n "$1" ] && append bss_conf "operator_icon=$1" "$N"
|
|
}
|
|
|
|
append_osu_icon() {
|
|
- append bss_conf "osu_icon=$1" "$N"
|
|
+ [ -n "$1" ] && append bss_conf "osu_icon=$1" "$N"
|
|
}
|
|
|
|
append_osu_provider() {
|
|
- local cfgtype osu_server_uri osu_friendly_name osu_nai osu_nai2 osu_method_list
|
|
+ local cfgtype osu_server_uri osu_nai osu_nai2 osu_method_list
|
|
|
|
config_load wireless
|
|
config_get cfgtype "$1" TYPE
|
|
@@ -441,12 +457,13 @@ append_osu_provider() {
|
|
config_get osu_nai2 "$1" osu_nai2
|
|
config_get osu_method_list "$1" osu_method
|
|
|
|
- append bss_conf "osu_server_uri=$osu_server_uri" "$N"
|
|
- append bss_conf "osu_nai=$osu_nai" "$N"
|
|
- append bss_conf "osu_nai2=$osu_nai2" "$N"
|
|
- append bss_conf "osu_method_list=$osu_method_list" "$N"
|
|
+ [ -n "$osu_server_uri" ] && append bss_conf "osu_server_uri=$osu_server_uri" "$N"
|
|
+ [ -n "$osu_nai" ] && append bss_conf "osu_nai=$osu_nai" "$N"
|
|
+ [ -n "$osu_nai2" ] && append bss_conf "osu_nai2=$osu_nai2" "$N"
|
|
+ [ -n "$osu_method_list" ] && append bss_conf "osu_method_list=$osu_method_list" "$N"
|
|
|
|
config_list_foreach "$1" osu_service_desc append_osu_provider_service_desc
|
|
+ config_list_foreach "$1" osu_friendly_name append_osu_friendly_name
|
|
config_list_foreach "$1" osu_icon append_osu_icon
|
|
|
|
append bss_conf "$N"
|
|
@@ -456,6 +473,14 @@ append_hs20_conn_capab() {
|
|
[ -n "$1" ] && append bss_conf "hs20_conn_capab=$1" "$N"
|
|
}
|
|
|
|
+append_radius_acct_req_attr() {
|
|
+ [ -n "$1" ] && append bss_conf "radius_acct_req_attr=$1" "$N"
|
|
+}
|
|
+
|
|
+append_radius_auth_req_attr() {
|
|
+ [ -n "$1" ] && append bss_conf "radius_auth_req_attr=$1" "$N"
|
|
+}
|
|
+
|
|
append_airtime_sta_weight() {
|
|
[ -n "$1" ] && append bss_conf "airtime_sta_weight=$1" "$N"
|
|
}
|
|
@@ -482,7 +507,7 @@ hostapd_set_bss_options() {
|
|
bss_load_update_period chan_util_avg_period sae_require_mfp \
|
|
multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \
|
|
airtime_bss_weight airtime_bss_limit airtime_sta_weight \
|
|
- multicast_to_unicast per_sta_vif
|
|
+ multicast_to_unicast per_sta_vif rts_threshold
|
|
|
|
set_default isolate 0
|
|
set_default maxassoc 0
|
|
@@ -503,6 +528,7 @@ hostapd_set_bss_options() {
|
|
set_default multi_ap 0
|
|
set_default airtime_bss_weight 0
|
|
set_default airtime_bss_limit 0
|
|
+ set_default rts_threshold -1
|
|
|
|
append bss_conf "ctrl_interface=/var/run/hostapd"
|
|
if [ "$isolate" -gt 0 ]; then
|
|
@@ -529,6 +555,7 @@ hostapd_set_bss_options() {
|
|
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
|
|
append bss_conf "utf8_ssid=$utf8_ssid" "$N"
|
|
append bss_conf "multi_ap=$multi_ap" "$N"
|
|
+ append bss_conf "rts_threshold=$rts_threshold" "$N"
|
|
|
|
[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N"
|
|
|
|
@@ -547,6 +574,7 @@ hostapd_set_bss_options() {
|
|
append bss_conf "acct_server_shared_secret=$acct_secret" "$N"
|
|
[ -n "$acct_interval" ] && \
|
|
append bss_conf "radius_acct_interim_interval=$acct_interval" "$N"
|
|
+ json_for_each_item append_radius_acct_req_attr radius_acct_req_attr
|
|
}
|
|
|
|
case "$auth_type" in
|
|
@@ -601,7 +629,7 @@ hostapd_set_bss_options() {
|
|
auth_server auth_secret auth_port \
|
|
dae_client dae_secret dae_port \
|
|
ownip radius_client_addr \
|
|
- eap_reauth_period
|
|
+ eap_reauth_period request_cui
|
|
|
|
# radius can provide VLAN ID for clients
|
|
vlan_possible=1
|
|
@@ -613,18 +641,20 @@ hostapd_set_bss_options() {
|
|
|
|
set_default auth_port 1812
|
|
set_default dae_port 3799
|
|
-
|
|
+ set_default request_cui 0
|
|
|
|
append bss_conf "auth_server_addr=$auth_server" "$N"
|
|
append bss_conf "auth_server_port=$auth_port" "$N"
|
|
append bss_conf "auth_server_shared_secret=$auth_secret" "$N"
|
|
|
|
+ [ "$request_cui" -gt 0 ] && append bss_conf "radius_request_cui=$request_cui" "$N"
|
|
[ -n "$eap_reauth_period" ] && append bss_conf "eap_reauth_period=$eap_reauth_period" "$N"
|
|
|
|
[ -n "$dae_client" -a -n "$dae_secret" ] && {
|
|
append bss_conf "radius_das_port=$dae_port" "$N"
|
|
append bss_conf "radius_das_client=$dae_client $dae_secret" "$N"
|
|
}
|
|
+ json_for_each_item append_radius_auth_req_attr radius_auth_req_attr
|
|
|
|
[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N"
|
|
[ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N"
|
|
@@ -871,13 +901,14 @@ hostapd_set_bss_options() {
|
|
}
|
|
}
|
|
|
|
- json_get_vars iw_enabled iw_internet iw_asra iw_esr iw_uesa iw_access_network_type
|
|
+ json_get_vars interworking iw_internet iw_asra iw_esr iw_uesa iw_access_network_type
|
|
json_get_vars iw_hessid iw_venue_group iw_venue_type iw_network_auth_type
|
|
json_get_vars iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm
|
|
json_get_vars iw_anqp_elem iw_qos_map_set iw_ipaddr_type_availability iw_gas_address3
|
|
+ json_get_vars iw_venue_name iw_venue_url
|
|
|
|
- set_default iw_enabled 0
|
|
- if [ "$iw_enabled" = "1" ]; then
|
|
+ set_default interworking 0
|
|
+ if [ "$interworking" = "1" ]; then
|
|
append bss_conf "interworking=1" "$N"
|
|
set_default iw_internet 1
|
|
set_default iw_asra 0
|
|
@@ -903,6 +934,8 @@ hostapd_set_bss_options() {
|
|
json_for_each_item append_iw_roaming_consortium iw_roaming_consortium
|
|
json_for_each_item append_iw_anqp_elem iw_anqp_elem
|
|
json_for_each_item append_iw_nai_realm iw_nai_realm
|
|
+ json_for_each_item append_iw_venue_name iw_venue_name
|
|
+ json_for_each_item append_iw_venue_url iw_venue_url
|
|
|
|
iw_domain_name_conf=
|
|
json_for_each_item append_iw_domain_name iw_domain_name
|
|
@@ -917,9 +950,11 @@ hostapd_set_bss_options() {
|
|
|
|
|
|
local hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \
|
|
- osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
|
|
+ osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
|
|
+ hs20_t_c_server_url
|
|
json_get_vars hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \
|
|
- osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
|
|
+ osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp \
|
|
+ hs20_t_c_server_url
|
|
|
|
set_default hs20 0
|
|
set_default disable_dgaf $hs20
|
|
@@ -929,17 +964,18 @@ hostapd_set_bss_options() {
|
|
if [ "$hs20" = "1" ]; then
|
|
append bss_conf "hs20=1" "$N"
|
|
append_hs20_icons
|
|
- append bss_conf "disable_dgaf=$disable_dgaf" "$N"
|
|
- append bss_conf "osen=$osen" "$N"
|
|
- append bss_conf "anqp_domain_id=$anqp_domain_id" "$N"
|
|
- append bss_conf "hs20_deauth_req_timeout=$hs20_deauth_req_timeout" "$N"
|
|
+ [ -n "$disable_dgaf"] && append bss_conf "disable_dgaf=$disable_dgaf" "$N"
|
|
+ [ -n "$osen"] && append bss_conf "osen=$osen" "$N"
|
|
+ [ "$anqp_domain_id" -gt 0 ] && append bss_conf "anqp_domain_id=$anqp_domain_id" "$N"
|
|
+ [ -n "$hs20_deauth_req_timeout"] && append bss_conf "hs20_deauth_req_timeout=$hs20_deauth_req_timeout" "$N"
|
|
[ -n "$osu_ssid" ] && append bss_conf "osu_ssid=$osu_ssid" "$N"
|
|
[ -n "$hs20_wan_metrics" ] && append bss_conf "hs20_wan_metrics=$hs20_wan_metrics" "$N"
|
|
[ -n "$hs20_operating_class" ] && append bss_conf "hs20_operating_class=$hs20_operating_class" "$N"
|
|
[ -n "$hs20_t_c_filename" ] && append bss_conf "hs20_t_c_filename=$hs20_t_c_filename" "$N"
|
|
[ -n "$hs20_t_c_timestamp" ] && append bss_conf "hs20_t_c_timestamp=$hs20_t_c_timestamp" "$N"
|
|
- json_for_each_item append_hs20_conn_capab hs20_conn_capab
|
|
+ [ -n "$hs20_t_c_server_url" ] && append bss_conf "hs20_t_c_server_url=$hs20_t_c_server_url" "$N"
|
|
json_for_each_item append_hs20_oper_friendly_name hs20_oper_friendly_name
|
|
+ json_for_each_item append_hs20_conn_capab hs20_conn_capab
|
|
json_for_each_item append_osu_provider osu_provider
|
|
json_for_each_item append_operator_icon operator_icon
|
|
fi
|
|
--
|
|
2.25.1
|
|
|