]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Multi-AP: Fix backhaul SSID printing condition
authorJouni Malinen <j@w1.fi>
Sun, 21 Feb 2021 10:33:33 +0000 (12:33 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 21 Feb 2021 10:50:34 +0000 (12:50 +0200)
ssid->ssid is an array so comparison against NULL is pointless; check
ssid->ssid_len instead.

Fixes: 871d6648f502 ("hostapd: Add multi_ap settings to get_config() output")
Signed-off-by: Jouni Malinen <j@w1.fi>
hostapd/ctrl_iface.c

index 5859d160581fa79251b7c488bd66bfd79fe9f3ec..3254557913d2b1b055adfe7540b1a3d33b9a50dc 100644 (file)
@@ -1233,7 +1233,7 @@ static int hostapd_ctrl_iface_get_config(struct hostapd_data *hapd,
                        return pos - buf;
                pos += ret;
 
-               if (ssid->ssid) {
+               if (ssid->ssid_len) {
                        ret = os_snprintf(pos, end - pos,
                                          "multi_ap_backhaul_ssid=%s\n",
                                          wpa_ssid_txt(ssid->ssid,