When an AP switches from a non-ML to an ML configuration, hostapd
crashes. The crash occurs because the memory allocation for the 'mld'
structure happens only during the AP’s startup if the 'mld_ap' option is
enabled. Consequently, when hostapd transitions from a non-ML to an ML
configuration, the MLD structure’s memory remains unallocated, leading
to a crash when accessed.
Fix this by initiating hostapd_init() whenever the AP transitions
between ML and non-ML configurations to ensure proper memory allocation
for the MLD structure.
Signed-off-by: Ajith C <quic_ajithc@quicinc.com>
if (os_strcmp(newconf->bss[i]->iface,
oldconf->bss[i]->iface) != 0)
return 1;
+#ifdef CONFIG_IEEE80211BE
+ if (newconf->bss[i]->mld_ap != oldconf->bss[i]->mld_ap)
+ return 1;
+#endif /* CONFIG_IEEE80211BE */
}
return 0;