Corrected hash size for sta_info structure

This commit is contained in:
Kapil Gupta
2022-06-06 13:01:25 +05:30
parent e9128b3b5b
commit 28a06d07f7
2 changed files with 4 additions and 15 deletions

View File

@@ -93,8 +93,8 @@ struct hostapd_data {
u8 own_addr[ETH_ALEN];
struct sta_info *sta_list; /* STA info list head */
#define STA_HASH_SIZE 10
#define STA_HASH(sta) (sta[5] & 0xa)
#define STA_HASH_SIZE 16
#define STA_HASH(sta) (sta[5] & 0xf)
struct sta_info *sta_hash[STA_HASH_SIZE];
int num_sta; /* number of entries in sta_list */

View File

@@ -37,7 +37,6 @@
#define STATE_MACHINE_ADDR sm->addr
static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx);
static int wpa_sm_step(struct wpa_state_machine *sm);
static int wpa_verify_key_mic(int akmp, struct wpa_ptk *PTK, u8 *data,
size_t data_len);
@@ -805,7 +804,7 @@ continue_processing:
return;
}
sm->MICVerified = TRUE;
eloop_cancel_timeout(wpa_send_eapol_timeout, wpa_auth, sm);
eloop_cancel_timeout(resend_eapol_handle, (void*)(sm->index), NULL);
sm->pending_1_of_4_timeout = 0;
}
@@ -916,16 +915,6 @@ static int wpa_gmk_to_gtk(const u8 *gmk, const char *label, const u8 *addr,
}
static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx)
{
struct wpa_state_machine *sm = timeout_ctx;
sm->pending_1_of_4_timeout = 0;
sm->TimeoutEvt = TRUE;
wpa_sm_step(sm);
}
void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
struct wpa_state_machine *sm, int key_info,
const u8 *key_rsc, const u8 *nonce,
@@ -1549,7 +1538,7 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
#endif /* CONFIG_IEEE80211R_AP */
sm->pending_1_of_4_timeout = 0;
eloop_cancel_timeout(wpa_send_eapol_timeout, sm->wpa_auth, sm);
eloop_cancel_timeout(resend_eapol_handle, (void*)(sm->index), NULL);
if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) && sm->PMK != pmk) {
/* PSK may have changed from the previous choice, so update