mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
hostapd: Fix adding neighbor entry
It is possible that a LCI or location civic configuration buffer is valid but contains no data. In such a case do not add the LCI and location civic information to the entry in the neighbor data base. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
99b82bf537
commit
f5ec346902
@ -83,13 +83,13 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid,
|
|||||||
if (!entry->nr)
|
if (!entry->nr)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (lci) {
|
if (lci && wpabuf_len(lci)) {
|
||||||
entry->lci = wpabuf_dup(lci);
|
entry->lci = wpabuf_dup(lci);
|
||||||
if (!entry->lci || os_get_time(&entry->lci_date))
|
if (!entry->lci || os_get_time(&entry->lci_date))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (civic) {
|
if (civic && wpabuf_len(civic)) {
|
||||||
entry->civic = wpabuf_dup(civic);
|
entry->civic = wpabuf_dup(civic);
|
||||||
if (!entry->civic)
|
if (!entry->civic)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user