From: Jouni Malinen Date: Tue, 23 Apr 2013 11:11:10 +0000 (+0300) Subject: P2P: Increase GTK rekeying period to 24 hours X-Git-Tag: aosp-kk-from-upstream~356 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a07a276ecd73b08961e68b0c72bec4be1b61a0c;p=thirdparty%2Fhostap.git P2P: Increase GTK rekeying period to 24 hours Strong ciphers do not need frequent rekeying, so increase the default GTK rekeying period to 24 hours. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 3ba44964d..4033492a7 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -251,6 +251,16 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s, bss->rsn_pairwise = WPA_CIPHER_NONE; } + if (bss->wpa_group_rekey < 86400 && (bss->wpa & 2) && + (bss->wpa_group == WPA_CIPHER_CCMP || + bss->wpa_group == WPA_CIPHER_GCMP)) { + /* + * Strong ciphers do not need frequent rekeying, so increase + * the default GTK rekeying period to 24 hours. + */ + bss->wpa_group_rekey = 86400; + } + #ifdef CONFIG_WPS /* * Enable WPS by default for open and WPA/WPA2-Personal network, but