PeerKey: Remove dead code related to STSL negotiation state
The struct wpa_stsl_negotiation seemed to have been for some kind of tracking of state of PeerKey negotiations within hostapd. However, nothing is actually adding any entries to wpa_auth->stsl_negotiations or using this state. Since PeerKey does not look like something that would be deployed in practice, there is no justification to spend time on making this any more complete. Remove the dead code now instead of trying to figure out what it might be used for. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e37c0aa5d1
commit
8492cc79c0
3 changed files with 0 additions and 57 deletions
|
@ -19,17 +19,6 @@
|
|||
|
||||
#ifdef CONFIG_PEERKEY
|
||||
|
||||
static void wpa_stsl_step(void *eloop_ctx, void *timeout_ctx)
|
||||
{
|
||||
#if 0
|
||||
struct wpa_authenticator *wpa_auth = eloop_ctx;
|
||||
struct wpa_stsl_negotiation *neg = timeout_ctx;
|
||||
#endif
|
||||
|
||||
/* TODO: ? */
|
||||
}
|
||||
|
||||
|
||||
struct wpa_stsl_search {
|
||||
const u8 *addr;
|
||||
struct wpa_state_machine *sm;
|
||||
|
@ -110,7 +99,6 @@ void wpa_smk_m1(struct wpa_authenticator *wpa_auth,
|
|||
MAC2STR(kde.mac_addr));
|
||||
wpa_smk_send_error(wpa_auth, sm, kde.mac_addr, STK_MUI_SMK,
|
||||
STK_ERR_STA_NR);
|
||||
/* FIX: wpa_stsl_remove(wpa_auth, neg); */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -285,7 +273,6 @@ void wpa_smk_m3(struct wpa_authenticator *wpa_auth,
|
|||
MAC2STR(kde.mac_addr));
|
||||
wpa_smk_send_error(wpa_auth, sm, kde.mac_addr, STK_MUI_SMK,
|
||||
STK_ERR_STA_NR);
|
||||
/* FIX: wpa_stsl_remove(wpa_auth, neg); */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -365,32 +352,4 @@ void wpa_smk_error(struct wpa_authenticator *wpa_auth,
|
|||
wpa_smk_send_error(wpa_auth, search.sm, sm->addr, mui, error_type);
|
||||
}
|
||||
|
||||
|
||||
int wpa_stsl_remove(struct wpa_authenticator *wpa_auth,
|
||||
struct wpa_stsl_negotiation *neg)
|
||||
{
|
||||
struct wpa_stsl_negotiation *pos, *prev;
|
||||
|
||||
if (wpa_auth == NULL)
|
||||
return -1;
|
||||
pos = wpa_auth->stsl_negotiations;
|
||||
prev = NULL;
|
||||
while (pos) {
|
||||
if (pos == neg) {
|
||||
if (prev)
|
||||
prev->next = pos->next;
|
||||
else
|
||||
wpa_auth->stsl_negotiations = pos->next;
|
||||
|
||||
eloop_cancel_timeout(wpa_stsl_step, wpa_auth, pos);
|
||||
os_free(pos);
|
||||
return 0;
|
||||
}
|
||||
prev = pos;
|
||||
pos = pos->next;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PEERKEY */
|
||||
|
|
|
@ -513,11 +513,6 @@ void wpa_deinit(struct wpa_authenticator *wpa_auth)
|
|||
eloop_cancel_timeout(wpa_rekey_gmk, wpa_auth, NULL);
|
||||
eloop_cancel_timeout(wpa_rekey_gtk, wpa_auth, NULL);
|
||||
|
||||
#ifdef CONFIG_PEERKEY
|
||||
while (wpa_auth->stsl_negotiations)
|
||||
wpa_stsl_remove(wpa_auth, wpa_auth->stsl_negotiations);
|
||||
#endif /* CONFIG_PEERKEY */
|
||||
|
||||
pmksa_cache_auth_deinit(wpa_auth->pmksa);
|
||||
|
||||
#ifdef CONFIG_IEEE80211R_AP
|
||||
|
|
|
@ -14,13 +14,6 @@
|
|||
|
||||
struct wpa_group;
|
||||
|
||||
struct wpa_stsl_negotiation {
|
||||
struct wpa_stsl_negotiation *next;
|
||||
u8 initiator[ETH_ALEN];
|
||||
u8 peer[ETH_ALEN];
|
||||
};
|
||||
|
||||
|
||||
struct wpa_state_machine {
|
||||
struct wpa_authenticator *wpa_auth;
|
||||
struct wpa_group *group;
|
||||
|
@ -200,8 +193,6 @@ struct wpa_authenticator {
|
|||
unsigned int dot11RSNATKIPCounterMeasuresInvoked;
|
||||
unsigned int dot11RSNA4WayHandshakeFailures;
|
||||
|
||||
struct wpa_stsl_negotiation *stsl_negotiations;
|
||||
|
||||
struct wpa_auth_config conf;
|
||||
const struct wpa_auth_callbacks *cb;
|
||||
void *cb_ctx;
|
||||
|
@ -239,8 +230,6 @@ int wpa_auth_for_each_auth(struct wpa_authenticator *wpa_auth,
|
|||
void *cb_ctx);
|
||||
|
||||
#ifdef CONFIG_PEERKEY
|
||||
int wpa_stsl_remove(struct wpa_authenticator *wpa_auth,
|
||||
struct wpa_stsl_negotiation *neg);
|
||||
void wpa_smk_error(struct wpa_authenticator *wpa_auth,
|
||||
struct wpa_state_machine *sm,
|
||||
const u8 *key_data, size_t key_data_len);
|
||||
|
|
Loading…
Reference in a new issue