aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_i.h
diff options
context:
space:
mode:
authorMichael Braun <michael-dev@fami-braun.de>2015-04-26 12:22:55 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-26 13:56:22 (GMT)
commita0ad9e8c9ee19829f2c52156d5e5ff38a5c963da (patch)
tree8932eb42dc0d0298b46f09c35339605d0b2aee86 /src/ap/wpa_auth_i.h
parentf80fd58de66fa9fb8dccf899ac51f929f0801e15 (diff)
downloadhostap-a0ad9e8c9ee19829f2c52156d5e5ff38a5c963da.zip
hostap-a0ad9e8c9ee19829f2c52156d5e5ff38a5c963da.tar.gz
hostap-a0ad9e8c9ee19829f2c52156d5e5ff38a5c963da.tar.bz2
Remove WPA per-VLAN groups when no more stations remain
Previously, struct wpa_group was created when the first station enters the group and the struct wpa_group was not freed when all station left the group. This causes a problem because wpa_group will enter FATAL_FAILURE when a wpa_group is running while the AP_VLAN interface has already been removed. Fix this by adding a reference counter to struct wpa_group and free a group if it is unused. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Diffstat (limited to 'src/ap/wpa_auth_i.h')
-rw-r--r--src/ap/wpa_auth_i.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h
index 7b2cd3e..57b098f 100644
--- a/src/ap/wpa_auth_i.h
+++ b/src/ap/wpa_auth_i.h
@@ -169,6 +169,8 @@ struct wpa_group {
u8 IGTK[2][WPA_IGTK_MAX_LEN];
int GN_igtk, GM_igtk;
#endif /* CONFIG_IEEE80211W */
+ /* Number of references except those in struct wpa_group->next */
+ unsigned int references;
};