Clear configuration blobs on FLUSH command
All te network blocks and credentials were already cleared, but configurations blobs should also be cleared here, e.g., to get more consistent behavior test cases using EAP-FAST PACs. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
53a6f06a0b
commit
d9bb2821e7
3 changed files with 19 additions and 12 deletions
|
@ -1926,6 +1926,22 @@ void wpa_config_free_cred(struct wpa_cred *cred)
|
|||
}
|
||||
|
||||
|
||||
void wpa_config_flush_blobs(struct wpa_config *config)
|
||||
{
|
||||
#ifndef CONFIG_NO_CONFIG_BLOBS
|
||||
struct wpa_config_blob *blob, *prev;
|
||||
|
||||
blob = config->blobs;
|
||||
config->blobs = NULL;
|
||||
while (blob) {
|
||||
prev = blob;
|
||||
blob = blob->next;
|
||||
wpa_config_free_blob(prev);
|
||||
}
|
||||
#endif /* CONFIG_NO_CONFIG_BLOBS */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wpa_config_free - Free configuration data
|
||||
* @config: Configuration data from wpa_config_read()
|
||||
|
@ -1935,9 +1951,6 @@ void wpa_config_free_cred(struct wpa_cred *cred)
|
|||
*/
|
||||
void wpa_config_free(struct wpa_config *config)
|
||||
{
|
||||
#ifndef CONFIG_NO_CONFIG_BLOBS
|
||||
struct wpa_config_blob *blob, *prevblob;
|
||||
#endif /* CONFIG_NO_CONFIG_BLOBS */
|
||||
struct wpa_ssid *ssid, *prev = NULL;
|
||||
struct wpa_cred *cred, *cprev;
|
||||
|
||||
|
@ -1955,15 +1968,7 @@ void wpa_config_free(struct wpa_config *config)
|
|||
wpa_config_free_cred(cprev);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_NO_CONFIG_BLOBS
|
||||
blob = config->blobs;
|
||||
prevblob = NULL;
|
||||
while (blob) {
|
||||
prevblob = blob;
|
||||
blob = blob->next;
|
||||
wpa_config_free_blob(prevblob);
|
||||
}
|
||||
#endif /* CONFIG_NO_CONFIG_BLOBS */
|
||||
wpa_config_flush_blobs(config);
|
||||
|
||||
wpabuf_free(config->wps_vendor_ext_m1);
|
||||
os_free(config->ctrl_interface);
|
||||
|
|
|
@ -979,6 +979,7 @@ void wpa_config_set_blob(struct wpa_config *config,
|
|||
struct wpa_config_blob *blob);
|
||||
void wpa_config_free_blob(struct wpa_config_blob *blob);
|
||||
int wpa_config_remove_blob(struct wpa_config *config, const char *name);
|
||||
void wpa_config_flush_blobs(struct wpa_config *config);
|
||||
|
||||
struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id);
|
||||
struct wpa_cred * wpa_config_add_cred(struct wpa_config *config);
|
||||
|
|
|
@ -5296,6 +5296,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
|
|||
wpa_s->extra_blacklist_count = 0;
|
||||
wpa_supplicant_ctrl_iface_remove_network(wpa_s, "all");
|
||||
wpa_supplicant_ctrl_iface_remove_cred(wpa_s, "all");
|
||||
wpa_config_flush_blobs(wpa_s->conf);
|
||||
|
||||
wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_LIFETIME, 43200);
|
||||
wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_REAUTH_THRESHOLD, 70);
|
||||
|
|
Loading…
Reference in a new issue