Clear idleWhile timer when EAP peer state machine is not in use
This allows the EAPOL tick timer to be stopped more quickly when getting disconnected. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
00e5e3d509
commit
09bcf3be9c
2 changed files with 8 additions and 1 deletions
|
@ -189,6 +189,12 @@ SM_STATE(EAP, DISABLED)
|
||||||
{
|
{
|
||||||
SM_ENTRY(EAP, DISABLED);
|
SM_ENTRY(EAP, DISABLED);
|
||||||
sm->num_rounds = 0;
|
sm->num_rounds = 0;
|
||||||
|
/*
|
||||||
|
* RFC 4137 does not describe clearing of idleWhile here, but doing so
|
||||||
|
* allows the timer tick to be stopped more quickly when EAP is not in
|
||||||
|
* use.
|
||||||
|
*/
|
||||||
|
eapol_set_int(sm, EAPOL_idleWhile, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1744,7 +1744,8 @@ static void eapol_sm_set_int(void *ctx, enum eapol_int_var variable,
|
||||||
switch (variable) {
|
switch (variable) {
|
||||||
case EAPOL_idleWhile:
|
case EAPOL_idleWhile:
|
||||||
sm->idleWhile = value;
|
sm->idleWhile = value;
|
||||||
eapol_enable_timer_tick(sm);
|
if (sm->idleWhile > 0)
|
||||||
|
eapol_enable_timer_tick(sm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue