From 5326cc72099d17c8b4746e2d5c04f70805d42ccd Mon Sep 17 00:00:00 2001 From: OpenEmbedded Date: Thu, 15 Sep 2022 12:35:29 +0000 --- hostapd/config_file.c | 2 ++ src/ap/ap_config.h | 1 + src/ap/wpa_auth_glue.c | 8 ++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index a7b7b91ae..62eaab122 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2996,6 +2996,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, wpa_printf(MSG_INFO, "Line %d: Obsolete peerkey parameter ignored", line); #ifdef CONFIG_IEEE80211R_AP + } else if (os_strcmp(buf, "ft_iface") == 0) { + os_strlcpy(bss->ft_iface, pos, sizeof(bss->ft_iface)); } else if (os_strcmp(buf, "mobility_domain") == 0) { if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN || hexstr2bin(pos, bss->mobility_domain, diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 5c466d529..f0ec2fe6a 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -283,6 +283,7 @@ struct airtime_sta_weight { struct hostapd_bss_config { char iface[IFNAMSIZ + 1]; char bridge[IFNAMSIZ + 1]; + char ft_iface[IFNAMSIZ + 1]; char vlan_bridge[IFNAMSIZ + 1]; char wds_bridge[IFNAMSIZ + 1]; diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 5c7075891..e5a9a7b35 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -1593,8 +1593,12 @@ int hostapd_setup_wpa(struct hostapd_data *hapd) wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) { const char *ft_iface; - ft_iface = hapd->conf->bridge[0] ? hapd->conf->bridge : - hapd->conf->iface; + if (hapd->conf->ft_iface[0]) + ft_iface = hapd->conf->ft_iface; + else if (hapd->conf->bridge[0]) + ft_iface = hapd->conf->bridge; + else + ft_iface = hapd->conf->iface; hapd->l2 = l2_packet_init(ft_iface, NULL, ETH_P_RRB, hostapd_rrb_receive, hapd, 1); if (!hapd->l2) {