[PATCH 3/4] RNR: add short_ssid to neighbor_db entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The RNR IE requires this field.

Signed-off-by: John Crispin <john@xxxxxxxxxxx>
---
 src/ap/hostapd.h     | 1 +
 src/ap/neighbor_db.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index b84627bf5..543041d96 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -139,6 +139,7 @@ struct hostapd_neighbor_entry {
 	struct os_time lci_date;
 	int stationary;
 	u8 bss_parameters;
+	u32 short_ssid;
 };
 
 struct hostapd_sae_commit_queue {
diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
index 41d0d1d15..0429be086 100644
--- a/src/ap/neighbor_db.c
+++ b/src/ap/neighbor_db.c
@@ -10,6 +10,7 @@
 #include "utils/includes.h"
 
 #include "utils/common.h"
+#include "utils/crc32.h"
 #include "hostapd.h"
 #include "ieee802_11.h"
 #include "neighbor_db.h"
@@ -135,6 +136,7 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid,
 
 	os_memcpy(entry->bssid, bssid, ETH_ALEN);
 	os_memcpy(&entry->ssid, ssid, sizeof(entry->ssid));
+	entry->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
 
 	entry->nr = wpabuf_dup(nr);
 	if (!entry->nr)
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux