@@ -13,6 +13,7 @@
#include "utils/common.h"
#include "utils/uuid.h"
+#include "utils/crc32.h"
#include "common/ieee802_11_defs.h"
#include "common/sae.h"
#include "crypto/sha256.h"
@@ -2355,6 +2356,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
}
os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len);
bss->ssid.ssid_set = 1;
+
+ /*
+ * Short SSID calculation is identical to FCS and it is defined in
+ * IEEE P802.11-REVmd/D3.0, 9.4.2.170.3 (Calculating the Short-SSID).
+ */
+ bss->ssid.short_ssid = crc32(bss->ssid.ssid, bss->ssid.ssid_len);
} else if (os_strcmp(buf, "ssid2") == 0) {
size_t slen;
char *str = wpa_config_parse_string(pos, &slen);
@@ -13,7 +13,6 @@
#include "utils/common.h"
#include "utils/eloop.h"
-#include "utils/crc32.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl.h"
#include "common/hw_features_common.h"
@@ -1246,12 +1245,6 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
os_memcpy(conf->ssid.ssid, ssid, conf->ssid.ssid_len);
}
- /*
- * Short SSID calculation is identical to FCS and it is defined in
- * IEEE P802.11-REVmd/D3.0, 9.4.2.170.3 (Calculating the Short-SSID).
- */
- conf->ssid.short_ssid = crc32(conf->ssid.ssid, conf->ssid.ssid_len);
-
if (!hostapd_drv_none(hapd)) {
wpa_printf(MSG_DEBUG, "Using interface %s with hwaddr " MACSTR
" and ssid \"%s\"",
During config reload the short_ssid was getting flushed. Move the generation into the config loading code. Signed-off-by: John Crispin <john@phrozen.org> --- hostapd/config_file.c | 7 +++++++ src/ap/hostapd.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)