]> git.ipfire.org Git - thirdparty/hostap.git/commit
AP MLD: Fix crash during config reload from non-ML to ML
authorAjith C <quic_ajithc@quicinc.com>
Tue, 3 Sep 2024 05:09:05 +0000 (10:39 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 29 Nov 2024 20:24:41 +0000 (22:24 +0200)
commit93f623f7454a687f7192a267fc114724bf77ca35
tree0a7e56d455a3a6b87eac4698b714dc650a4aa14c
parent5e6119234cb21a2884de3752c7e0f8510a58d2e9
AP MLD: Fix crash during config reload from non-ML to ML

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>
src/ap/hostapd.c