From: Mike Siedzik <msiedzik@xxxxxxxxxxxxxxxxxxx> All fixes per IEEE802.1X-2010 Figure 12-2 - CP state machine. 1) Upon entering RETIRE, deleteSAs(oki) 2) RECEIVING to TRANSMIT, add !controlledPortEnabled to branching logic 3) READY should move to ABANDON (not RECEIVE) when new_sak or changed_connect is true. 4) READY to TRANSMIT, add !controlledPortEnabled to branching logic Signed-off-by: Michael Siedzik <msiedzik@xxxxxxxxxxxxxxxxxxx> --- src/pae/ieee802_1x_cp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pae/ieee802_1x_cp.c b/src/pae/ieee802_1x_cp.c index e6b2767e2..05eab7e4b 100644 --- a/src/pae/ieee802_1x_cp.c +++ b/src/pae/ieee802_1x_cp.c @@ -319,8 +319,11 @@ SM_STATE(CP, RETIRE) SM_ENTRY(CP, RETIRE); /* RETIRE state machine not keep with Figure 12-2 in * IEEE Std 802.1X-2010 */ - os_free(sm->oki); - sm->oki = NULL; + if (sm->oki) { + ieee802_1x_kay_delete_sas(sm->kay, sm->oki); + os_free(sm->oki); + sm->oki = NULL; + } sm->orx = FALSE; sm->otx = FALSE; ieee802_1x_kay_set_old_sa_attr(sm->kay, sm->oki, sm->oan, @@ -382,7 +385,7 @@ SM_STEP(CP) if (!sm->elected_self) SM_ENTER(CP, READY); if (sm->elected_self && - (sm->all_receiving || !sm->transmit_when)) + (sm->all_receiving || !sm->controlled_port_enabled || !sm->transmit_when)) SM_ENTER(CP, TRANSMIT); break; @@ -405,8 +408,8 @@ SM_STEP(CP) case CP_READY: if (sm->new_sak || changed_connect(sm)) - SM_ENTER(CP, RECEIVE); - if (sm->server_transmitting) + SM_ENTER(CP, ABANDON); + if (sm->server_transmitting || !sm->controlled_port_enabled) SM_ENTER(CP, TRANSMIT); break; case CP_ABANDON: -- 2.11.1 ________________________________ DISCLAIMER: This e-mail and any attachments to it may contain confidential and proprietary material and is solely for the use of the intended recipient. Any review, use, disclosure, distribution or copying of this transmittal is prohibited except by or on behalf of the intended recipient. If you have received this transmittal in error, please notify the sender and destroy this e-mail and any attachments and all copies, whether electronic or printed. _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap