]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Re-configure WPA2 group keys on hostapd interface re-enable
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 10 Feb 2015 16:19:51 +0000 (18:19 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 10 Feb 2015 18:27:00 +0000 (20:27 +0200)
This allows WPA2 mode AP to be re-enabled automatically after external
ifconfig down + up on a netdev used by hostapd.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/drv_callbacks.c
src/ap/wpa_auth.c
src/ap/wpa_auth.h

index 181cc6d5feb07870b92a8d7c6918d2739b16b458..e39378450dad37d835c1b1abf90833bf8fdba3b0 100644 (file)
@@ -1216,6 +1216,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                         * Try to re-enable interface if the driver stopped it
                         * when the interface got disabled.
                         */
+                       wpa_auth_reconfig_group_keys(hapd->wpa_auth);
                        hapd->reenable_beacon = 1;
                        ieee802_11_set_beacon(hapd);
                }
index 668cb429dd245915afaf443544a5dc700c3228e1..9c5f6094acbb868662c70a68fa88e8eb67012312 100644 (file)
@@ -3387,3 +3387,14 @@ int wpa_auth_radius_das_disconnect_pmksa(struct wpa_authenticator *wpa_auth,
 {
        return pmksa_cache_auth_radius_das_disconnect(wpa_auth->pmksa, attr);
 }
+
+
+void wpa_auth_reconfig_group_keys(struct wpa_authenticator *wpa_auth)
+{
+       struct wpa_group *group;
+
+       if (!wpa_auth)
+               return;
+       for (group = wpa_auth->group; group; group = group->next)
+               wpa_group_config_group_keys(wpa_auth, group);
+}
index b34b84dd6cc74870229f534f6e252032620a0f04..2788e657435d520a093292540977d4eefaf351a5 100644 (file)
@@ -318,5 +318,6 @@ int wpa_auth_get_ip_addr(struct wpa_state_machine *sm, u8 *addr);
 struct radius_das_attrs;
 int wpa_auth_radius_das_disconnect_pmksa(struct wpa_authenticator *wpa_auth,
                                         struct radius_das_attrs *attr);
+void wpa_auth_reconfig_group_keys(struct wpa_authenticator *wpa_auth);
 
 #endif /* WPA_AUTH_H */