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>
This commit is contained in:
Jouni Malinen 2011-12-31 13:42:23 +02:00
parent 5fd9fb2772
commit d033694ac5

View file

@ -268,6 +268,15 @@ SM_STATE(SUPP_PAE, DISCONNECTED)
sm->unicast_key_received = FALSE; sm->unicast_key_received = FALSE;
sm->broadcast_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); SM_ENTRY(SUPP_BE, INITIALIZE);
eapol_sm_abortSupp(sm); eapol_sm_abortSupp(sm);
sm->suppAbort = FALSE; 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;
} }