wifi-scripts: make ft_iface configurable
authorRany Hany <[email protected]>
Wed, 19 Nov 2025 18:55:48 +0000 (18:55 +0000)
committerHauke Mehrtens <[email protected]>
Sun, 30 Nov 2025 23:25:16 +0000 (00:25 +0100)
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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20797
Signed-off-by: Hauke Mehrtens <[email protected]>
package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json
package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh

index 73be34d0e55391066185751148a590f0ba74f297..3e66c6bb182cf3561257fcdb781c871ab8c4cad5 100644 (file)
                        "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",
index b9bb07751ec6bd54c488a3e7f9e8e192e18b46dc..9f40680f46ceb1d980f682ae3d586c143e3b8b21 100644 (file)
@@ -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"