aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-12-31 13:42:23 +0200
committerJouni Malinen <j@w1.fi>2011-12-31 13:42:23 +0200
commitd033694ac571eadc934911767d03bbe1a34b3cb0 (patch)
tree6f0392f8479338e9914f03ac1927bb0cfaf7e96c /src/eapol_supp
parent5fd9fb2772dd0292c4dcaa5bca0e5aecedfcff7d (diff)
downloadexternal_wpa_supplicant_8_ti-d033694ac571eadc934911767d03bbe1a34b3cb0.zip
external_wpa_supplicant_8_ti-d033694ac571eadc934911767d03bbe1a34b3cb0.tar.gz
external_wpa_supplicant_8_ti-d033694ac571eadc934911767d03bbe1a34b3cb0.tar.bz2
Clear EAPOL authWhile and heldWhile values when port is disabled
IEEE Std 802.1X-2004 does not clear authWhile and heldWhile in this case, but doing so allows the timer tick to be stopped more quickly when the port is not enabled. Since these variables are used only within HELD and RECEIVE states, clearing them on initialization does not change actual state machine behavior. This reduces some unnecessary operations in port disabled state and cleans up the wpa_supplicant debug log after disconnection. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eapol_supp')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index ffc6619..0c2fadf 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -268,6 +268,15 @@ SM_STATE(SUPP_PAE, DISCONNECTED)
sm->unicast_key_received = FALSE;
sm->broadcast_key_received = FALSE;
+
+ /*
+ * IEEE Std 802.1X-2004 does not clear heldWhile here, but doing so
+ * allows the timer tick to be stopped more quickly when the port is
+ * not enabled. Since this variable is used only within HELD state,
+ * clearing it on initialization does not change actual state machine
+ * behavior.
+ */
+ sm->heldWhile = 0;
}
@@ -535,6 +544,15 @@ SM_STATE(SUPP_BE, INITIALIZE)
SM_ENTRY(SUPP_BE, INITIALIZE);
eapol_sm_abortSupp(sm);
sm->suppAbort = FALSE;
+
+ /*
+ * IEEE Std 802.1X-2004 does not clear authWhile here, but doing so
+ * allows the timer tick to be stopped more quickly when the port is
+ * not enabled. Since this variable is used only within RECEIVE state,
+ * clearing it on initialization does not change actual state machine
+ * behavior.
+ */
+ sm->authWhile = 0;
}