]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Increase GTK rekeying period to 24 hours
authorJouni Malinen <j@w1.fi>
Tue, 23 Apr 2013 11:11:10 +0000 (14:11 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 23 Apr 2013 11:11:10 +0000 (14:11 +0300)
Strong ciphers do not need frequent rekeying, so increase the default
GTK rekeying period to 24 hours.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/ap.c

index 3ba44964d92eec7d9ead85c5be3ef0153d798bf0..4033492a7ecc6376cc2d91f2768d5d07a365bfa9 100644 (file)
@@ -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