mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +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>
78 lines
3.2 KiB
Diff
78 lines
3.2 KiB
Diff
From 99cffd423352bceb3c2826b4262b575478b0a712 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Tue, 6 Apr 2021 14:59:41 +0200
|
|
Subject: [PATCH] hostapd: add eap_server support
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
.../network/services/hostapd/files/hostapd.sh | 25 ++++++++++++++++---
|
|
1 file changed, 21 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
|
|
index e391aae13b..a3263ed036 100644
|
|
--- a/package/network/services/hostapd/files/hostapd.sh
|
|
+++ b/package/network/services/hostapd/files/hostapd.sh
|
|
@@ -341,6 +341,9 @@ hostapd_common_add_bss_config() {
|
|
config_add_array radius_auth_req_attr
|
|
config_add_array radius_acct_req_attr
|
|
config_add_int rts_threshold
|
|
+
|
|
+ config_add_int eap_server
|
|
+ config_add_string eap_user_file ca_cert server_cert private_key private_key_passwd server_id
|
|
}
|
|
|
|
hostapd_set_vlan_file() {
|
|
@@ -507,7 +510,8 @@ 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 rts_threshold
|
|
+ multicast_to_unicast per_sta_vif rts_threshold \
|
|
+ eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id
|
|
|
|
set_default isolate 0
|
|
set_default maxassoc 0
|
|
@@ -529,6 +533,7 @@ hostapd_set_bss_options() {
|
|
set_default airtime_bss_weight 0
|
|
set_default airtime_bss_limit 0
|
|
set_default rts_threshold -1
|
|
+ set_default eap_server 0
|
|
|
|
append bss_conf "ctrl_interface=/var/run/hostapd"
|
|
if [ "$isolate" -gt 0 ]; then
|
|
@@ -643,9 +648,11 @@ hostapd_set_bss_options() {
|
|
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"
|
|
+ [ "$eap_server" -eq 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"
|
|
@@ -980,6 +987,16 @@ hostapd_set_bss_options() {
|
|
json_for_each_item append_operator_icon operator_icon
|
|
fi
|
|
|
|
+ if [ "$eap_server" = "1" ]; then
|
|
+ append bss_conf "eap_server=1" "$N"
|
|
+ [ -n "$eap_user_file" ] && append bss_conf "eap_user_file=$eap_user_file" "$N"
|
|
+ [ -n "$ca_cert" ] && append bss_conf "ca_cert=$ca_cert" "$N"
|
|
+ [ -n "$server_cert" ] && append bss_conf "server_cert=$server_cert" "$N"
|
|
+ [ -n "$private_key" ] && append bss_conf "private_key=$private_key" "$N"
|
|
+ [ -n "$private_key_passwd" ] && append bss_conf "private_key_passwd=$private_key_passwd" "$N"
|
|
+ [ -n "$server_id" ] && append bss_conf "server_id=$server_id" "$N"
|
|
+ fi
|
|
+
|
|
set_default multicast_to_unicast 0
|
|
if [ "$multicast_to_unicast" -gt 0 ]; then
|
|
append bss_conf "multicast_to_unicast=$multicast_to_unicast" "$N"
|
|
--
|
|
2.25.1
|
|
|