mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-21 01:41:41 +00:00
hostapd: fix segfault when deinit mesh ifaces
In hostapd_ubus_add_bss(), ubus objects are not registered for mesh interfaces. This provokes a segfault when accessing the ubus object in mesh deinit. This commit adds the same condition to hostapd_ubus_free_bss() for discarding those mesh interfaces. Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net> (cherry picked from commit 5269c47e8db549695ceaf6a19afdd0cb90074622)
This commit is contained in:
parent
5c904bcb37
commit
3a051a234a
@ -1351,6 +1351,11 @@ void hostapd_ubus_free_bss(struct hostapd_data *hapd)
|
||||
struct ubus_object *obj = &hapd->ubus.obj;
|
||||
char *name = (char *) obj->name;
|
||||
|
||||
#ifdef CONFIG_MESH
|
||||
if (hapd->conf->mesh & MESH_ENABLED)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (!ctx)
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user