PATCH: reauth_period

Gunter Burchardt gbur
Wed Jul 28 23:40:31 PDT 2004


Hello,

With this patch it is possible to configure eap_reauth_period in
hostapd.conf. At the moment this time is hard coded to 3600 seconds.

regards
gunter
-------------- next part --------------
diff -Nur hostap.old/hostapd/config.c hostap/hostapd/config.c
--- hostap.old/hostapd/config.c	2004-07-18 21:42:23.000000000 +0200
+++ hostap/hostapd/config.c	2004-07-29 08:26:04.000000000 +0200
@@ -37,6 +37,7 @@
 	conf->ssid_len = 4;
 	memcpy(conf->ssid, "test", 4);
 	conf->wep_rekeying_period = 300;
+	conf->eap_reauth_period = 3600;
 
 	conf->logger_syslog_level = HOSTAPD_LEVEL_INFO;
 	conf->logger_stdout_level = HOSTAPD_LEVEL_INFO;
@@ -394,6 +395,13 @@
 				       line, conf->wep_rekeying_period);
 				errors++;
 			}
+        } else if (strcmp(buf, "eap_reauth_period") == 0) {
+			conf->eap_reauth_period = atoi(pos);
+			if (conf->eap_reauth_period < 0) {
+				printf("Line %d: invalid period %d\n",
+						line, conf->eap_reauth_period);
+				errors++;
+			}
 		} else if (strcmp(buf, "eapol_key_index_workaround") == 0) {
 			conf->eapol_key_index_workaround = atoi(pos);
 		} else if (strcmp(buf, "iapp_interface") == 0) {
diff -Nur hostap.old/hostapd/config.h hostap/hostapd/config.h
--- hostap.old/hostapd/config.h	2004-07-18 21:42:23.000000000 +0200
+++ hostap/hostapd/config.h	2004-07-29 08:20:55.000000000 +0200
@@ -79,6 +79,7 @@
 	size_t default_wep_key_len;
 	int individual_wep_key_len;
 	int wep_rekeying_period;
+	int eap_reauth_period;
 
 	int ieee802_11f; /* use IEEE 802.11f (IAPP) */
 	char iapp_iface[IFNAMSIZ + 1]; /* interface used with IAPP broadcast
diff -Nur hostap.old/hostapd/eapol_sm.c hostap/hostapd/eapol_sm.c
--- hostap.old/hostapd/eapol_sm.c	2004-06-04 06:20:46.000000000 +0200
+++ hostap/hostapd/eapol_sm.c	2004-07-29 08:20:55.000000000 +0200
@@ -591,7 +591,7 @@
 	sm->be_auth.maxReq = BE_AUTH_DEFAULT_maxReq;
 
 	sm->reauth_timer.state = REAUTH_TIMER_INITIALIZE;
-	sm->reauth_timer.reAuthPeriod = REAUTH_TIMER_DEFAULT_reAuthPeriod;
+	sm->reauth_timer.reAuthPeriod = hapd->conf->eap_reauth_period;
 	sm->reauth_timer.reAuthEnabled = REAUTH_TIMER_DEFAULT_reAuthEnabled;
 
 	sm->portEnabled = FALSE;
diff -Nur hostap.old/hostapd/hostapd.conf hostap/hostapd/hostapd.conf
--- hostap.old/hostapd/hostapd.conf	2004-04-07 05:54:32.000000000 +0200
+++ hostap/hostapd/hostapd.conf	2004-07-29 08:30:02.000000000 +0200
@@ -95,6 +95,8 @@
 # only broadcast keys are used)
 eapol_key_index_workaround=0
 
+# EAP reauth period in seconds.
+#eap_reauth_period=3600
 
 ##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) #######################
 



More information about the Hostap mailing list