From cfb976d1d72ddf3c6ae35bac40939b14adfdef15 Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Wed, 19 Nov 2025 18:55:48 +0000 Subject: [PATCH] wifi-scripts: make ft_iface configurable This is useful as there are cases where no network is configured or the configured network is isolated (APs are blocked from communicating with each other over it). In both cases, it would make sense to set ft_iface to another interface dedicated to FT over DS traffic. Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/20797 Signed-off-by: Hauke Mehrtens --- .../files-ucode/usr/share/schema/wireless.wifi-iface.json | 4 ++++ .../config/wifi-scripts/files/lib/netifd/hostapd.sh | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json index 73be34d0e5..3e66c6bb18 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json @@ -343,6 +343,10 @@ "description": "DHCP server for FILS HLP. Set to '*' for automatic lookup.", "type": "string" }, + "ft_iface": { + "description": "Inter-AP communication interface for 802.11r", + "type": "string" + }, "ft_over_ds": { "description": "Whether to enable FT-over-DS", "type": "boolean", diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index b9bb07751e..9f40680f46 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -345,7 +345,7 @@ hostapd_common_add_bss_config() { config_add_boolean ieee80211r pmk_r1_push ft_psk_generate_local ft_over_ds config_add_int r0_key_lifetime reassociation_deadline - config_add_string mobility_domain r1_key_holder rxkh_file + config_add_string mobility_domain r1_key_holder rxkh_file ft_iface config_add_array r0kh r1kh config_add_int ieee80211w_max_timeout ieee80211w_retry_timeout @@ -916,11 +916,12 @@ hostapd_set_bss_options() { if [ "$wpa" -ge "2" ]; then if [ "$ieee80211r" -gt "0" ]; then - json_get_vars mobility_domain ft_psk_generate_local ft_over_ds reassociation_deadline + json_get_vars mobility_domain ft_psk_generate_local ft_over_ds reassociation_deadline ft_iface set_default mobility_domain "$(echo "$ssid" | md5sum | head -c 4)" set_default ft_over_ds 0 set_default reassociation_deadline 20000 + [ -n "$network_ifname" ] && set_default ft_iface "$network_ifname" case "$auth_type" in psk) @@ -931,7 +932,7 @@ hostapd_set_bss_options() { ;; esac - [ -n "$network_ifname" ] && append bss_conf "ft_iface=$network_ifname" "$N" + [ -n "$ft_iface" ] && append bss_conf "ft_iface=$ft_iface" "$N" append bss_conf "mobility_domain=$mobility_domain" "$N" append bss_conf "ft_psk_generate_local=$ft_psk_generate_local" "$N" append bss_conf "ft_over_ds=$ft_over_ds" "$N" -- 2.30.2