hostapd: fix segfault in wpa_supplicant ubus
authorDaniel Golle <daniel@makrotopia.org>
Wed, 18 Mar 2020 17:58:43 +0000 (18:58 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 18 Mar 2020 18:05:22 +0000 (19:05 +0100)
commit50a59b3a392aeb44c417ac3d7c2cdeea82ef2f15
treea998cc5b2aff3151b22f0d89d36617de4fd1bd2d
parent213250b56bb4a3043dcb5a48e2f849b9e45967d7
hostapd: fix segfault in wpa_supplicant ubus

When introducing ubus reload support, ubus initialization was moved
to the service level instead of being carried out when adding a BSS
configuration. While this works when using wpa_supplicant in that way,
it breaks the ability to run wpa_supplicant on the command line, eg.
for debugging purposes.
Fix that by re-introducing ubus context intialization when adding
configuration.

Reported-by: @PolynomialDivision https://github.com/openwrt/openwrt/pull/2417
Fixes: 60fb4c92b6 ("hostapd: add ubus reload")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/network/services/hostapd/Makefile
package/network/services/hostapd/src/wpa_supplicant/ubus.c