diff --git a/src/fst/fst.c b/src/fst/fst.c index 32cd941b4..fbe1175ac 100644 --- a/src/fst/fst.c +++ b/src/fst/fst.c @@ -214,6 +214,15 @@ Boolean fst_are_ifaces_aggregated(struct fst_iface *iface1, } +void fst_update_mac_addr(struct fst_iface *iface, const u8 *addr) +{ + fst_printf_iface(iface, MSG_DEBUG, "new MAC address " MACSTR, + MAC2STR(addr)); + os_memcpy(iface->own_addr, addr, sizeof(iface->own_addr)); + fst_group_update_ie(fst_iface_get_group(iface)); +} + + enum mb_band_id fst_hw_mode_to_band(enum hostapd_hw_mode mode) { switch (mode) { diff --git a/src/fst/fst.h b/src/fst/fst.h index 296749120..7ba60d545 100644 --- a/src/fst/fst.h +++ b/src/fst/fst.h @@ -279,6 +279,13 @@ void fst_notify_peer_disconnected(struct fst_iface *iface, const u8 *addr); Boolean fst_are_ifaces_aggregated(struct fst_iface *iface1, struct fst_iface *iface2); +/** + * fst_update_mac_addr - Notify FST about MAC address change + * @iface: FST interface object + * @addr: New MAC address + */ +void fst_update_mac_addr(struct fst_iface *iface, const u8 *addr); + #else /* CONFIG_FST */ static inline int fst_global_init(void) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 09c36097f..29f482038 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -4608,6 +4608,11 @@ int wpa_supplicant_update_mac_addr(struct wpa_supplicant *wpa_s) wpa_sm_set_own_addr(wpa_s->wpa, wpa_s->own_addr); wpas_wps_update_mac_addr(wpa_s); +#ifdef CONFIG_FST + if (wpa_s->fst) + fst_update_mac_addr(wpa_s->fst, wpa_s->own_addr); +#endif /* CONFIG_FST */ + return 0; }