Skip to content

Commit

Permalink
hostapd: fix segfault when deinit mesh ifaces
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jesferman authored and blocktrron committed Sep 24, 2021
1 parent b56f740 commit 5269c47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package/network/services/hostapd/src/src/ap/ubus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,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;

Expand Down

0 comments on commit 5269c47

Please sign in to comment.