EAPOL supp: Convert Boolean to C99 bool

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-04-24 00:51:11 +03:00 committed by Jouni Malinen
parent 37e3501bf7
commit da8478a1ab
8 changed files with 142 additions and 143 deletions

View File

@ -147,7 +147,7 @@ struct eapol_callbacks {
* @variable: EAPOL boolean variable to get * @variable: EAPOL boolean variable to get
* Returns: Value of the EAPOL variable * Returns: Value of the EAPOL variable
*/ */
Boolean (*get_bool)(void *ctx, enum eapol_bool_var variable); bool (*get_bool)(void *ctx, enum eapol_bool_var variable);
/** /**
* set_bool - Set a boolean EAPOL state variable * set_bool - Set a boolean EAPOL state variable
@ -155,8 +155,7 @@ struct eapol_callbacks {
* @variable: EAPOL boolean variable to set * @variable: EAPOL boolean variable to set
* @value: Value for the EAPOL variable * @value: Value for the EAPOL variable
*/ */
void (*set_bool)(void *ctx, enum eapol_bool_var variable, void (*set_bool)(void *ctx, enum eapol_bool_var variable, bool value);
Boolean value);
/** /**
* get_int - Get an integer EAPOL state variable * get_int - Get an integer EAPOL state variable

View File

@ -38,21 +38,21 @@ struct eapol_sm {
int timer_tick_enabled; int timer_tick_enabled;
/* Global variables */ /* Global variables */
Boolean eapFail; bool eapFail;
Boolean eapolEap; bool eapolEap;
Boolean eapSuccess; bool eapSuccess;
Boolean initialize; bool initialize;
Boolean keyDone; bool keyDone;
Boolean keyRun; bool keyRun;
PortControl portControl; PortControl portControl;
Boolean portEnabled; bool portEnabled;
PortStatus suppPortStatus; /* dot1xSuppControlledPortStatus */ PortStatus suppPortStatus; /* dot1xSuppControlledPortStatus */
Boolean portValid; bool portValid;
Boolean suppAbort; bool suppAbort;
Boolean suppFail; bool suppFail;
Boolean suppStart; bool suppStart;
Boolean suppSuccess; bool suppSuccess;
Boolean suppTimeout; bool suppTimeout;
/* Supplicant PAE state machine */ /* Supplicant PAE state machine */
enum { enum {
@ -69,10 +69,10 @@ struct eapol_sm {
SUPP_PAE_S_FORCE_UNAUTH = 10 SUPP_PAE_S_FORCE_UNAUTH = 10
} SUPP_PAE_state; /* dot1xSuppPaeState */ } SUPP_PAE_state; /* dot1xSuppPaeState */
/* Variables */ /* Variables */
Boolean userLogoff; bool userLogoff;
Boolean logoffSent; bool logoffSent;
unsigned int startCount; unsigned int startCount;
Boolean eapRestart; bool eapRestart;
PortControl sPortMode; PortControl sPortMode;
/* Constants */ /* Constants */
unsigned int heldPeriod; /* dot1xSuppHeldPeriod */ unsigned int heldPeriod; /* dot1xSuppHeldPeriod */
@ -85,7 +85,7 @@ struct eapol_sm {
KEY_RX_NO_KEY_RECEIVE, KEY_RX_KEY_RECEIVE KEY_RX_NO_KEY_RECEIVE, KEY_RX_KEY_RECEIVE
} KEY_RX_state; } KEY_RX_state;
/* Variables */ /* Variables */
Boolean rxKey; bool rxKey;
/* Supplicant Backend state machine */ /* Supplicant Backend state machine */
enum { enum {
@ -100,9 +100,9 @@ struct eapol_sm {
SUPP_BE_SUCCESS = 8 SUPP_BE_SUCCESS = 8
} SUPP_BE_state; /* dot1xSuppBackendPaeState */ } SUPP_BE_state; /* dot1xSuppBackendPaeState */
/* Variables */ /* Variables */
Boolean eapNoResp; bool eapNoResp;
Boolean eapReq; bool eapReq;
Boolean eapResp; bool eapResp;
/* Constants */ /* Constants */
unsigned int authPeriod; /* dot1xSuppAuthPeriod */ unsigned int authPeriod; /* dot1xSuppAuthPeriod */
@ -120,30 +120,30 @@ struct eapol_sm {
unsigned char dot1xSuppLastEapolFrameSource[6]; unsigned char dot1xSuppLastEapolFrameSource[6];
/* Miscellaneous variables (not defined in IEEE 802.1X-2004) */ /* Miscellaneous variables (not defined in IEEE 802.1X-2004) */
Boolean changed; bool changed;
struct eap_sm *eap; struct eap_sm *eap;
struct eap_peer_config *config; struct eap_peer_config *config;
Boolean initial_req; bool initial_req;
u8 *last_rx_key; u8 *last_rx_key;
size_t last_rx_key_len; size_t last_rx_key_len;
struct wpabuf *eapReqData; /* for EAP */ struct wpabuf *eapReqData; /* for EAP */
Boolean altAccept; /* for EAP */ bool altAccept; /* for EAP */
Boolean altReject; /* for EAP */ bool altReject; /* for EAP */
Boolean eapTriggerStart; bool eapTriggerStart;
Boolean replay_counter_valid; bool replay_counter_valid;
u8 last_replay_counter[16]; u8 last_replay_counter[16];
struct eapol_config conf; struct eapol_config conf;
struct eapol_ctx *ctx; struct eapol_ctx *ctx;
enum { EAPOL_CB_IN_PROGRESS = 0, EAPOL_CB_SUCCESS, EAPOL_CB_FAILURE } enum { EAPOL_CB_IN_PROGRESS = 0, EAPOL_CB_SUCCESS, EAPOL_CB_FAILURE }
cb_status; cb_status;
Boolean cached_pmk; bool cached_pmk;
Boolean unicast_key_received, broadcast_key_received; bool unicast_key_received, broadcast_key_received;
Boolean force_authorized_update; bool force_authorized_update;
#ifdef CONFIG_EAP_PROXY #ifdef CONFIG_EAP_PROXY
Boolean use_eap_proxy; bool use_eap_proxy;
struct eap_proxy_sm *eap_proxy; struct eap_proxy_sm *eap_proxy;
#endif /* CONFIG_EAP_PROXY */ #endif /* CONFIG_EAP_PROXY */
}; };
@ -224,7 +224,7 @@ SM_STATE(SUPP_PAE, LOGOFF)
{ {
SM_ENTRY(SUPP_PAE, LOGOFF); SM_ENTRY(SUPP_PAE, LOGOFF);
eapol_sm_txLogoff(sm); eapol_sm_txLogoff(sm);
sm->logoffSent = TRUE; sm->logoffSent = true;
eapol_sm_set_port_unauthorized(sm); eapol_sm_set_port_unauthorized(sm);
} }
@ -234,13 +234,13 @@ SM_STATE(SUPP_PAE, DISCONNECTED)
SM_ENTRY(SUPP_PAE, DISCONNECTED); SM_ENTRY(SUPP_PAE, DISCONNECTED);
sm->sPortMode = Auto; sm->sPortMode = Auto;
sm->startCount = 0; sm->startCount = 0;
sm->eapTriggerStart = FALSE; sm->eapTriggerStart = false;
sm->logoffSent = FALSE; sm->logoffSent = false;
eapol_sm_set_port_unauthorized(sm); eapol_sm_set_port_unauthorized(sm);
sm->suppAbort = TRUE; sm->suppAbort = true;
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 * IEEE Std 802.1X-2004 does not clear heldWhile here, but doing so
@ -263,7 +263,7 @@ SM_STATE(SUPP_PAE, CONNECTING)
send_start = 1; send_start = 1;
if (sm->ctx->preauth) if (sm->ctx->preauth)
send_start = 1; send_start = 1;
sm->eapTriggerStart = FALSE; sm->eapTriggerStart = false;
if (send_start) { if (send_start) {
sm->startWhen = sm->startPeriod; sm->startWhen = sm->startPeriod;
@ -286,7 +286,7 @@ SM_STATE(SUPP_PAE, CONNECTING)
} }
} }
eapol_enable_timer_tick(sm); eapol_enable_timer_tick(sm);
sm->eapolEap = FALSE; sm->eapolEap = false;
if (send_start) if (send_start)
eapol_sm_txStart(sm); eapol_sm_txStart(sm);
} }
@ -296,12 +296,12 @@ SM_STATE(SUPP_PAE, AUTHENTICATING)
{ {
SM_ENTRY(SUPP_PAE, AUTHENTICATING); SM_ENTRY(SUPP_PAE, AUTHENTICATING);
sm->startCount = 0; sm->startCount = 0;
sm->suppSuccess = FALSE; sm->suppSuccess = false;
sm->suppFail = FALSE; sm->suppFail = false;
sm->suppTimeout = FALSE; sm->suppTimeout = false;
sm->keyRun = FALSE; sm->keyRun = false;
sm->keyDone = FALSE; sm->keyDone = false;
sm->suppStart = TRUE; sm->suppStart = true;
} }
@ -331,16 +331,16 @@ SM_STATE(SUPP_PAE, RESTART)
} }
SM_ENTRY(SUPP_PAE, RESTART); SM_ENTRY(SUPP_PAE, RESTART);
sm->eapRestart = TRUE; sm->eapRestart = true;
if (sm->altAccept) { if (sm->altAccept) {
/* /*
* Prevent EAP peer state machine from failing due to prior * Prevent EAP peer state machine from failing due to prior
* external EAP success notification (altSuccess=TRUE in the * external EAP success notification (altSuccess=true in the
* IDLE state could result in a transition to the FAILURE state. * IDLE state could result in a transition to the FAILURE state.
*/ */
wpa_printf(MSG_DEBUG, "EAPOL: Clearing prior altAccept TRUE"); wpa_printf(MSG_DEBUG, "EAPOL: Clearing prior altAccept TRUE");
sm->eapSuccess = FALSE; sm->eapSuccess = false;
sm->altAccept = FALSE; sm->altAccept = false;
} }
} }
@ -412,7 +412,7 @@ SM_STEP(SUPP_PAE)
wpa_printf(MSG_DEBUG, "EAPOL: IEEE 802.1X for " wpa_printf(MSG_DEBUG, "EAPOL: IEEE 802.1X for "
"plaintext connection; no EAPOL-Key frames " "plaintext connection; no EAPOL-Key frames "
"required"); "required");
sm->portValid = TRUE; sm->portValid = true;
if (sm->ctx->eapol_done_cb) if (sm->ctx->eapol_done_cb)
sm->ctx->eapol_done_cb(sm->ctx->ctx); sm->ctx->eapol_done_cb(sm->ctx->ctx);
} }
@ -459,7 +459,7 @@ SM_STATE(KEY_RX, KEY_RECEIVE)
{ {
SM_ENTRY(KEY_RX, KEY_RECEIVE); SM_ENTRY(KEY_RX, KEY_RECEIVE);
eapol_sm_processKey(sm); eapol_sm_processKey(sm);
sm->rxKey = FALSE; sm->rxKey = false;
} }
@ -486,7 +486,7 @@ SM_STATE(SUPP_BE, REQUEST)
{ {
SM_ENTRY(SUPP_BE, REQUEST); SM_ENTRY(SUPP_BE, REQUEST);
sm->authWhile = 0; sm->authWhile = 0;
sm->eapReq = TRUE; sm->eapReq = true;
eapol_sm_getSuppRsp(sm); eapol_sm_getSuppRsp(sm);
} }
@ -495,15 +495,15 @@ SM_STATE(SUPP_BE, RESPONSE)
{ {
SM_ENTRY(SUPP_BE, RESPONSE); SM_ENTRY(SUPP_BE, RESPONSE);
eapol_sm_txSuppRsp(sm); eapol_sm_txSuppRsp(sm);
sm->eapResp = FALSE; sm->eapResp = false;
} }
SM_STATE(SUPP_BE, SUCCESS) SM_STATE(SUPP_BE, SUCCESS)
{ {
SM_ENTRY(SUPP_BE, SUCCESS); SM_ENTRY(SUPP_BE, SUCCESS);
sm->keyRun = TRUE; sm->keyRun = true;
sm->suppSuccess = TRUE; sm->suppSuccess = true;
#ifdef CONFIG_EAP_PROXY #ifdef CONFIG_EAP_PROXY
if (sm->use_eap_proxy) { if (sm->use_eap_proxy) {
@ -513,7 +513,7 @@ SM_STATE(SUPP_BE, SUCCESS)
/* New key received - clear IEEE 802.1X EAPOL-Key replay /* New key received - clear IEEE 802.1X EAPOL-Key replay
* counter */ * counter */
sm->replay_counter_valid = FALSE; sm->replay_counter_valid = false;
session_id = eap_proxy_get_eap_session_id( session_id = eap_proxy_get_eap_session_id(
sm->eap_proxy, &session_id_len); sm->eap_proxy, &session_id_len);
@ -534,7 +534,7 @@ SM_STATE(SUPP_BE, SUCCESS)
if (eap_key_available(sm->eap)) { if (eap_key_available(sm->eap)) {
/* New key received - clear IEEE 802.1X EAPOL-Key replay /* New key received - clear IEEE 802.1X EAPOL-Key replay
* counter */ * counter */
sm->replay_counter_valid = FALSE; sm->replay_counter_valid = false;
} }
} }
@ -542,22 +542,22 @@ SM_STATE(SUPP_BE, SUCCESS)
SM_STATE(SUPP_BE, FAIL) SM_STATE(SUPP_BE, FAIL)
{ {
SM_ENTRY(SUPP_BE, FAIL); SM_ENTRY(SUPP_BE, FAIL);
sm->suppFail = TRUE; sm->suppFail = true;
} }
SM_STATE(SUPP_BE, TIMEOUT) SM_STATE(SUPP_BE, TIMEOUT)
{ {
SM_ENTRY(SUPP_BE, TIMEOUT); SM_ENTRY(SUPP_BE, TIMEOUT);
sm->suppTimeout = TRUE; sm->suppTimeout = true;
} }
SM_STATE(SUPP_BE, IDLE) SM_STATE(SUPP_BE, IDLE)
{ {
SM_ENTRY(SUPP_BE, IDLE); SM_ENTRY(SUPP_BE, IDLE);
sm->suppStart = FALSE; sm->suppStart = false;
sm->initial_req = TRUE; sm->initial_req = true;
} }
@ -565,7 +565,7 @@ 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 * IEEE Std 802.1X-2004 does not clear authWhile here, but doing so
@ -583,9 +583,9 @@ SM_STATE(SUPP_BE, RECEIVE)
SM_ENTRY(SUPP_BE, RECEIVE); SM_ENTRY(SUPP_BE, RECEIVE);
sm->authWhile = sm->authPeriod; sm->authWhile = sm->authPeriod;
eapol_enable_timer_tick(sm); eapol_enable_timer_tick(sm);
sm->eapolEap = FALSE; sm->eapolEap = false;
sm->eapNoResp = FALSE; sm->eapNoResp = false;
sm->initial_req = FALSE; sm->initial_req = false;
} }
@ -831,7 +831,7 @@ static void eapol_sm_processKey(struct eapol_sm *sm)
return; return;
} }
sm->replay_counter_valid = TRUE; sm->replay_counter_valid = true;
os_memcpy(sm->last_replay_counter, key->replay_counter, os_memcpy(sm->last_replay_counter, key->replay_counter,
IEEE8021X_REPLAY_COUNTER_LEN); IEEE8021X_REPLAY_COUNTER_LEN);
@ -850,9 +850,9 @@ static void eapol_sm_processKey(struct eapol_sm *sm)
" driver."); " driver.");
} else { } else {
if (key->key_index & IEEE8021X_KEY_INDEX_FLAG) if (key->key_index & IEEE8021X_KEY_INDEX_FLAG)
sm->unicast_key_received = TRUE; sm->unicast_key_received = true;
else else
sm->broadcast_key_received = TRUE; sm->broadcast_key_received = true;
if ((sm->unicast_key_received || if ((sm->unicast_key_received ||
!(sm->conf.required_keys & EAPOL_REQUIRE_KEY_UNICAST)) && !(sm->conf.required_keys & EAPOL_REQUIRE_KEY_UNICAST)) &&
@ -861,7 +861,7 @@ static void eapol_sm_processKey(struct eapol_sm *sm)
{ {
wpa_printf(MSG_DEBUG, "EAPOL: all required EAPOL-Key " wpa_printf(MSG_DEBUG, "EAPOL: all required EAPOL-Key "
"frames received"); "frames received");
sm->portValid = TRUE; sm->portValid = true;
if (sm->ctx->eapol_done_cb) if (sm->ctx->eapol_done_cb)
sm->ctx->eapol_done_cb(sm->ctx->ctx); sm->ctx->eapol_done_cb(sm->ctx->ctx);
} }
@ -949,7 +949,7 @@ static void eapol_sm_set_port_authorized(struct eapol_sm *sm)
int cb; int cb;
cb = sm->suppPortStatus != Authorized || sm->force_authorized_update; cb = sm->suppPortStatus != Authorized || sm->force_authorized_update;
sm->force_authorized_update = FALSE; sm->force_authorized_update = false;
sm->suppPortStatus = Authorized; sm->suppPortStatus = Authorized;
if (cb && sm->ctx->port_cb) if (cb && sm->ctx->port_cb)
sm->ctx->port_cb(sm->ctx->ctx, 1); sm->ctx->port_cb(sm->ctx->ctx, 1);
@ -961,7 +961,7 @@ static void eapol_sm_set_port_unauthorized(struct eapol_sm *sm)
int cb; int cb;
cb = sm->suppPortStatus != Unauthorized || sm->force_authorized_update; cb = sm->suppPortStatus != Unauthorized || sm->force_authorized_update;
sm->force_authorized_update = FALSE; sm->force_authorized_update = false;
sm->suppPortStatus = Unauthorized; sm->suppPortStatus = Unauthorized;
if (cb && sm->ctx->port_cb) if (cb && sm->ctx->port_cb)
sm->ctx->port_cb(sm->ctx->ctx, 0); sm->ctx->port_cb(sm->ctx->ctx, 0);
@ -985,7 +985,7 @@ void eapol_sm_step(struct eapol_sm *sm)
* allow events (e.g., SIGTERM) to stop the program cleanly if the * allow events (e.g., SIGTERM) to stop the program cleanly if the
* state machine were to generate a busy loop. */ * state machine were to generate a busy loop. */
for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) {
sm->changed = FALSE; sm->changed = false;
SM_STEP_RUN(SUPP_PAE); SM_STEP_RUN(SUPP_PAE);
SM_STEP_RUN(KEY_RX); SM_STEP_RUN(KEY_RX);
SM_STEP_RUN(SUPP_BE); SM_STEP_RUN(SUPP_BE);
@ -993,11 +993,11 @@ void eapol_sm_step(struct eapol_sm *sm)
if (sm->use_eap_proxy) { if (sm->use_eap_proxy) {
/* Drive the EAP proxy state machine */ /* Drive the EAP proxy state machine */
if (eap_proxy_sm_step(sm->eap_proxy, sm->eap)) if (eap_proxy_sm_step(sm->eap_proxy, sm->eap))
sm->changed = TRUE; sm->changed = true;
} else } else
#endif /* CONFIG_EAP_PROXY */ #endif /* CONFIG_EAP_PROXY */
if (eap_peer_sm_step(sm->eap)) if (eap_peer_sm_step(sm->eap))
sm->changed = TRUE; sm->changed = true;
if (!sm->changed) if (!sm->changed)
break; break;
} }
@ -1370,7 +1370,7 @@ int eapol_sm_rx_eapol(struct eapol_sm *sm, const u8 *src, const u8 *buf,
if (sm->eapReqData) { if (sm->eapReqData) {
wpa_printf(MSG_DEBUG, "EAPOL: Received EAP-Packet " wpa_printf(MSG_DEBUG, "EAPOL: Received EAP-Packet "
"frame"); "frame");
sm->eapolEap = TRUE; sm->eapolEap = true;
#ifdef CONFIG_EAP_PROXY #ifdef CONFIG_EAP_PROXY
if (sm->use_eap_proxy) { if (sm->use_eap_proxy) {
eap_proxy_packet_update( eap_proxy_packet_update(
@ -1411,7 +1411,7 @@ int eapol_sm_rx_eapol(struct eapol_sm *sm, const u8 *src, const u8 *buf,
"frame"); "frame");
os_memcpy(sm->last_rx_key, buf, data_len); os_memcpy(sm->last_rx_key, buf, data_len);
sm->last_rx_key_len = data_len; sm->last_rx_key_len = data_len;
sm->rxKey = TRUE; sm->rxKey = true;
eapol_sm_step(sm); eapol_sm_step(sm);
} }
break; break;
@ -1454,14 +1454,14 @@ void eapol_sm_notify_tx_eapol_key(struct eapol_sm *sm)
* *
* Notify EAPOL state machine about new portEnabled value. * Notify EAPOL state machine about new portEnabled value.
*/ */
void eapol_sm_notify_portEnabled(struct eapol_sm *sm, Boolean enabled) void eapol_sm_notify_portEnabled(struct eapol_sm *sm, bool enabled)
{ {
if (sm == NULL) if (sm == NULL)
return; return;
wpa_printf(MSG_DEBUG, "EAPOL: External notification - " wpa_printf(MSG_DEBUG, "EAPOL: External notification - "
"portEnabled=%d", enabled); "portEnabled=%d", enabled);
if (sm->portEnabled != enabled) if (sm->portEnabled != enabled)
sm->force_authorized_update = TRUE; sm->force_authorized_update = true;
sm->portEnabled = enabled; sm->portEnabled = enabled;
eapol_sm_step(sm); eapol_sm_step(sm);
} }
@ -1474,7 +1474,7 @@ void eapol_sm_notify_portEnabled(struct eapol_sm *sm, Boolean enabled)
* *
* Notify EAPOL state machine about new portValid value. * Notify EAPOL state machine about new portValid value.
*/ */
void eapol_sm_notify_portValid(struct eapol_sm *sm, Boolean valid) void eapol_sm_notify_portValid(struct eapol_sm *sm, bool valid)
{ {
if (sm == NULL) if (sm == NULL)
return; return;
@ -1488,15 +1488,15 @@ void eapol_sm_notify_portValid(struct eapol_sm *sm, Boolean valid)
/** /**
* eapol_sm_notify_eap_success - Notification of external EAP success trigger * eapol_sm_notify_eap_success - Notification of external EAP success trigger
* @sm: Pointer to EAPOL state machine allocated with eapol_sm_init() * @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
* @success: %TRUE = set success, %FALSE = clear success * @success: %true = set success, %false = clear success
* *
* Notify the EAPOL state machine that external event has forced EAP state to * Notify the EAPOL state machine that external event has forced EAP state to
* success (success = %TRUE). This can be cleared by setting success = %FALSE. * success (success = %true). This can be cleared by setting success = %false.
* *
* This function is called to update EAP state when WPA-PSK key handshake has * This function is called to update EAP state when WPA-PSK key handshake has
* been completed successfully since WPA-PSK does not use EAP state machine. * been completed successfully since WPA-PSK does not use EAP state machine.
*/ */
void eapol_sm_notify_eap_success(struct eapol_sm *sm, Boolean success) void eapol_sm_notify_eap_success(struct eapol_sm *sm, bool success)
{ {
if (sm == NULL) if (sm == NULL)
return; return;
@ -1513,12 +1513,12 @@ void eapol_sm_notify_eap_success(struct eapol_sm *sm, Boolean success)
/** /**
* eapol_sm_notify_eap_fail - Notification of external EAP failure trigger * eapol_sm_notify_eap_fail - Notification of external EAP failure trigger
* @sm: Pointer to EAPOL state machine allocated with eapol_sm_init() * @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
* @fail: %TRUE = set failure, %FALSE = clear failure * @fail: %true = set failure, %false = clear failure
* *
* Notify EAPOL state machine that external event has forced EAP state to * Notify EAPOL state machine that external event has forced EAP state to
* failure (fail = %TRUE). This can be cleared by setting fail = %FALSE. * failure (fail = %true). This can be cleared by setting fail = %false.
*/ */
void eapol_sm_notify_eap_fail(struct eapol_sm *sm, Boolean fail) void eapol_sm_notify_eap_fail(struct eapol_sm *sm, bool fail)
{ {
if (sm == NULL) if (sm == NULL)
return; return;
@ -1659,7 +1659,7 @@ const u8 * eapol_sm_get_session_id(struct eapol_sm *sm, size_t *len)
* *
* Notify EAPOL state machines that user requested logon/logoff. * Notify EAPOL state machines that user requested logon/logoff.
*/ */
void eapol_sm_notify_logoff(struct eapol_sm *sm, Boolean logoff) void eapol_sm_notify_logoff(struct eapol_sm *sm, bool logoff)
{ {
if (sm) { if (sm) {
sm->userLogoff = logoff; sm->userLogoff = logoff;
@ -1684,7 +1684,7 @@ void eapol_sm_notify_cached(struct eapol_sm *sm)
if (sm == NULL) if (sm == NULL)
return; return;
wpa_printf(MSG_DEBUG, "EAPOL: PMKSA caching was used - skip EAPOL"); wpa_printf(MSG_DEBUG, "EAPOL: PMKSA caching was used - skip EAPOL");
sm->eapSuccess = TRUE; sm->eapSuccess = true;
eap_notify_success(sm->eap); eap_notify_success(sm->eap);
eapol_sm_step(sm); eapol_sm_step(sm);
} }
@ -1701,7 +1701,7 @@ void eapol_sm_notify_pmkid_attempt(struct eapol_sm *sm)
if (sm == NULL) if (sm == NULL)
return; return;
wpa_printf(MSG_DEBUG, "RSN: Trying to use cached PMKSA"); wpa_printf(MSG_DEBUG, "RSN: Trying to use cached PMKSA");
sm->cached_pmk = TRUE; sm->cached_pmk = true;
} }
@ -1711,7 +1711,7 @@ static void eapol_sm_abort_cached(struct eapol_sm *sm)
"doing full EAP authentication"); "doing full EAP authentication");
if (sm == NULL) if (sm == NULL)
return; return;
sm->cached_pmk = FALSE; sm->cached_pmk = false;
sm->SUPP_PAE_state = SUPP_PAE_CONNECTING; sm->SUPP_PAE_state = SUPP_PAE_CONNECTING;
eapol_sm_set_port_unauthorized(sm); eapol_sm_set_port_unauthorized(sm);
@ -1790,8 +1790,8 @@ void eapol_sm_notify_ctrl_response(struct eapol_sm *sm)
wpa_printf(MSG_DEBUG, "EAPOL: received control response (user " wpa_printf(MSG_DEBUG, "EAPOL: received control response (user "
"input) notification - retrying pending EAP " "input) notification - retrying pending EAP "
"Request"); "Request");
sm->eapolEap = TRUE; sm->eapolEap = true;
sm->eapReq = TRUE; sm->eapReq = true;
eapol_sm_step(sm); eapol_sm_step(sm);
} }
} }
@ -1860,11 +1860,11 @@ static struct wpabuf * eapol_sm_get_eapReqData(void *ctx)
} }
static Boolean eapol_sm_get_bool(void *ctx, enum eapol_bool_var variable) static bool eapol_sm_get_bool(void *ctx, enum eapol_bool_var variable)
{ {
struct eapol_sm *sm = ctx; struct eapol_sm *sm = ctx;
if (sm == NULL) if (sm == NULL)
return FALSE; return false;
switch (variable) { switch (variable) {
case EAPOL_eapSuccess: case EAPOL_eapSuccess:
return sm->eapSuccess; return sm->eapSuccess;
@ -1887,12 +1887,12 @@ static Boolean eapol_sm_get_bool(void *ctx, enum eapol_bool_var variable)
case EAPOL_eapTriggerStart: case EAPOL_eapTriggerStart:
return sm->eapTriggerStart; return sm->eapTriggerStart;
} }
return FALSE; return false;
} }
static void eapol_sm_set_bool(void *ctx, enum eapol_bool_var variable, static void eapol_sm_set_bool(void *ctx, enum eapol_bool_var variable,
Boolean value) bool value)
{ {
struct eapol_sm *sm = ctx; struct eapol_sm *sm = ctx;
if (sm == NULL) if (sm == NULL)
@ -1994,8 +1994,8 @@ static void eapol_sm_notify_pending(void *ctx)
if (sm->eapReqData && !sm->eapReq) { if (sm->eapReqData && !sm->eapReq) {
wpa_printf(MSG_DEBUG, "EAPOL: received notification from EAP " wpa_printf(MSG_DEBUG, "EAPOL: received notification from EAP "
"state machine - retrying pending EAP Request"); "state machine - retrying pending EAP Request");
sm->eapolEap = TRUE; sm->eapolEap = true;
sm->eapReq = TRUE; sm->eapReq = true;
eapol_sm_step(sm); eapol_sm_step(sm);
} }
} }
@ -2141,7 +2141,7 @@ struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
} }
#ifdef CONFIG_EAP_PROXY #ifdef CONFIG_EAP_PROXY
sm->use_eap_proxy = FALSE; sm->use_eap_proxy = false;
sm->eap_proxy = eap_proxy_init(sm, &eapol_cb, sm->ctx->msg_ctx); sm->eap_proxy = eap_proxy_init(sm, &eapol_cb, sm->ctx->msg_ctx);
if (sm->eap_proxy == NULL) { if (sm->eap_proxy == NULL) {
wpa_printf(MSG_ERROR, "Unable to initialize EAP Proxy"); wpa_printf(MSG_ERROR, "Unable to initialize EAP Proxy");
@ -2149,10 +2149,10 @@ struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
#endif /* CONFIG_EAP_PROXY */ #endif /* CONFIG_EAP_PROXY */
/* Initialize EAPOL state machines */ /* Initialize EAPOL state machines */
sm->force_authorized_update = TRUE; sm->force_authorized_update = true;
sm->initialize = TRUE; sm->initialize = true;
eapol_sm_step(sm); eapol_sm_step(sm);
sm->initialize = FALSE; sm->initialize = false;
eapol_sm_step(sm); eapol_sm_step(sm);
if (eloop_register_timeout(1, 0, eapol_port_timers_tick, NULL, sm) == 0) if (eloop_register_timeout(1, 0, eapol_port_timers_tick, NULL, sm) == 0)

View File

@ -325,16 +325,16 @@ void eapol_sm_configure(struct eapol_sm *sm, int heldPeriod, int authPeriod,
int eapol_sm_rx_eapol(struct eapol_sm *sm, const u8 *src, const u8 *buf, int eapol_sm_rx_eapol(struct eapol_sm *sm, const u8 *src, const u8 *buf,
size_t len); size_t len);
void eapol_sm_notify_tx_eapol_key(struct eapol_sm *sm); void eapol_sm_notify_tx_eapol_key(struct eapol_sm *sm);
void eapol_sm_notify_portEnabled(struct eapol_sm *sm, Boolean enabled); void eapol_sm_notify_portEnabled(struct eapol_sm *sm, bool enabled);
void eapol_sm_notify_portValid(struct eapol_sm *sm, Boolean valid); void eapol_sm_notify_portValid(struct eapol_sm *sm, bool valid);
void eapol_sm_notify_eap_success(struct eapol_sm *sm, Boolean success); void eapol_sm_notify_eap_success(struct eapol_sm *sm, bool success);
void eapol_sm_notify_eap_fail(struct eapol_sm *sm, Boolean fail); void eapol_sm_notify_eap_fail(struct eapol_sm *sm, bool fail);
void eapol_sm_notify_config(struct eapol_sm *sm, void eapol_sm_notify_config(struct eapol_sm *sm,
struct eap_peer_config *config, struct eap_peer_config *config,
const struct eapol_config *conf); const struct eapol_config *conf);
int eapol_sm_get_key(struct eapol_sm *sm, u8 *key, size_t len); int eapol_sm_get_key(struct eapol_sm *sm, u8 *key, size_t len);
const u8 * eapol_sm_get_session_id(struct eapol_sm *sm, size_t *len); const u8 * eapol_sm_get_session_id(struct eapol_sm *sm, size_t *len);
void eapol_sm_notify_logoff(struct eapol_sm *sm, Boolean logoff); void eapol_sm_notify_logoff(struct eapol_sm *sm, bool logoff);
void eapol_sm_notify_cached(struct eapol_sm *sm); void eapol_sm_notify_cached(struct eapol_sm *sm);
void eapol_sm_notify_pmkid_attempt(struct eapol_sm *sm); void eapol_sm_notify_pmkid_attempt(struct eapol_sm *sm);
void eapol_sm_register_scard_ctx(struct eapol_sm *sm, void *ctx); void eapol_sm_register_scard_ctx(struct eapol_sm *sm, void *ctx);
@ -397,18 +397,18 @@ static inline void eapol_sm_notify_tx_eapol_key(struct eapol_sm *sm)
{ {
} }
static inline void eapol_sm_notify_portEnabled(struct eapol_sm *sm, static inline void eapol_sm_notify_portEnabled(struct eapol_sm *sm,
Boolean enabled) bool enabled)
{ {
} }
static inline void eapol_sm_notify_portValid(struct eapol_sm *sm, static inline void eapol_sm_notify_portValid(struct eapol_sm *sm,
Boolean valid) bool valid)
{ {
} }
static inline void eapol_sm_notify_eap_success(struct eapol_sm *sm, static inline void eapol_sm_notify_eap_success(struct eapol_sm *sm,
Boolean success) bool success)
{ {
} }
static inline void eapol_sm_notify_eap_fail(struct eapol_sm *sm, Boolean fail) static inline void eapol_sm_notify_eap_fail(struct eapol_sm *sm, bool fail)
{ {
} }
static inline void eapol_sm_notify_config(struct eapol_sm *sm, static inline void eapol_sm_notify_config(struct eapol_sm *sm,
@ -425,7 +425,7 @@ eapol_sm_get_session_id(struct eapol_sm *sm, size_t *len)
{ {
return NULL; return NULL;
} }
static inline void eapol_sm_notify_logoff(struct eapol_sm *sm, Boolean logoff) static inline void eapol_sm_notify_logoff(struct eapol_sm *sm, bool logoff)
{ {
} }
static inline void eapol_sm_notify_cached(struct eapol_sm *sm) static inline void eapol_sm_notify_cached(struct eapol_sm *sm)

View File

@ -8203,7 +8203,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_LIFETIME, 43200); wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_LIFETIME, 43200);
wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_REAUTH_THRESHOLD, 70); wpa_sm_set_param(wpa_s->wpa, RSNA_PMK_REAUTH_THRESHOLD, 70);
wpa_sm_set_param(wpa_s->wpa, RSNA_SA_TIMEOUT, 60); wpa_sm_set_param(wpa_s->wpa, RSNA_SA_TIMEOUT, 60);
eapol_sm_notify_logoff(wpa_s->eapol, FALSE); eapol_sm_notify_logoff(wpa_s->eapol, false);
radio_remove_works(wpa_s, NULL, 1); radio_remove_works(wpa_s, NULL, 1);
wpa_s->ext_work_in_progress = 0; wpa_s->ext_work_in_progress = 0;
@ -10217,9 +10217,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
reply_len = wpa_supplicant_ctrl_iface_get(wpa_s, buf + 4, reply_len = wpa_supplicant_ctrl_iface_get(wpa_s, buf + 4,
reply, reply_size); reply, reply_size);
} else if (os_strcmp(buf, "LOGON") == 0) { } else if (os_strcmp(buf, "LOGON") == 0) {
eapol_sm_notify_logoff(wpa_s->eapol, FALSE); eapol_sm_notify_logoff(wpa_s->eapol, false);
} else if (os_strcmp(buf, "LOGOFF") == 0) { } else if (os_strcmp(buf, "LOGOFF") == 0) {
eapol_sm_notify_logoff(wpa_s->eapol, TRUE); eapol_sm_notify_logoff(wpa_s->eapol, true);
} else if (os_strcmp(buf, "REASSOCIATE") == 0) { } else if (os_strcmp(buf, "REASSOCIATE") == 0) {
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
reply_len = -1; reply_len = -1;

View File

@ -644,9 +644,9 @@ static int test_eapol(struct eapol_test_data *e, struct wpa_supplicant *wpa_s,
eapol_sm_register_scard_ctx(wpa_s->eapol, wpa_s->scard); eapol_sm_register_scard_ctx(wpa_s->eapol, wpa_s->scard);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, false);
/* 802.1X::portControl = Auto */ /* 802.1X::portControl = Auto */
eapol_sm_notify_portEnabled(wpa_s->eapol, TRUE); eapol_sm_notify_portEnabled(wpa_s->eapol, true);
return 0; return 0;
} }

View File

@ -322,12 +322,12 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
if (bssid_changed) if (bssid_changed)
wpas_notify_bssid_changed(wpa_s); wpas_notify_bssid_changed(wpa_s);
eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE); eapol_sm_notify_portEnabled(wpa_s->eapol, false);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, false);
if (wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) || if (wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) ||
wpa_s->key_mgmt == WPA_KEY_MGMT_OWE || wpa_s->key_mgmt == WPA_KEY_MGMT_OWE ||
wpa_s->key_mgmt == WPA_KEY_MGMT_DPP || wpa_s->drv_authorized_port) wpa_s->key_mgmt == WPA_KEY_MGMT_DPP || wpa_s->drv_authorized_port)
eapol_sm_notify_eap_success(wpa_s->eapol, FALSE); eapol_sm_notify_eap_success(wpa_s->eapol, false);
wpa_s->drv_authorized_port = 0; wpa_s->drv_authorized_port = 0;
wpa_s->ap_ies_from_associnfo = 0; wpa_s->ap_ies_from_associnfo = 0;
wpa_s->current_ssid = NULL; wpa_s->current_ssid = NULL;
@ -3033,7 +3033,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
already_authorized = data && data->assoc_info.authorized; already_authorized = data && data->assoc_info.authorized;
/* /*
* Set portEnabled first to FALSE in order to get EAP state machine out * Set portEnabled first to false in order to get EAP state machine out
* of the SUCCESS state and eapSuccess cleared. Without this, EAPOL PAE * of the SUCCESS state and eapSuccess cleared. Without this, EAPOL PAE
* state machine may transit to AUTHENTICATING state based on obsolete * state machine may transit to AUTHENTICATING state based on obsolete
* eapSuccess and then trigger BE_AUTH to SUCCESS and PAE to * eapSuccess and then trigger BE_AUTH to SUCCESS and PAE to
@ -3041,16 +3041,16 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
* reset the state. * reset the state.
*/ */
if (!ft_completed && !already_authorized) { if (!ft_completed && !already_authorized) {
eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE); eapol_sm_notify_portEnabled(wpa_s->eapol, false);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, false);
} }
if (wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) || if (wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) ||
wpa_s->key_mgmt == WPA_KEY_MGMT_DPP || wpa_s->key_mgmt == WPA_KEY_MGMT_DPP ||
wpa_s->key_mgmt == WPA_KEY_MGMT_OWE || ft_completed || wpa_s->key_mgmt == WPA_KEY_MGMT_OWE || ft_completed ||
already_authorized || wpa_s->drv_authorized_port) already_authorized || wpa_s->drv_authorized_port)
eapol_sm_notify_eap_success(wpa_s->eapol, FALSE); eapol_sm_notify_eap_success(wpa_s->eapol, false);
/* 802.1X::portControl = Auto */ /* 802.1X::portControl = Auto */
eapol_sm_notify_portEnabled(wpa_s->eapol, TRUE); eapol_sm_notify_portEnabled(wpa_s->eapol, true);
wpa_s->eapol_received = 0; wpa_s->eapol_received = 0;
if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE || if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE ||
wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE || wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE ||
@ -3082,8 +3082,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
*/ */
wpa_supplicant_cancel_auth_timeout(wpa_s); wpa_supplicant_cancel_auth_timeout(wpa_s);
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
eapol_sm_notify_portValid(wpa_s->eapol, TRUE); eapol_sm_notify_portValid(wpa_s->eapol, true);
eapol_sm_notify_eap_success(wpa_s->eapol, TRUE); eapol_sm_notify_eap_success(wpa_s->eapol, true);
} else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK) && } else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK) &&
wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt)) { wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt)) {
/* /*
@ -3092,8 +3092,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
*/ */
wpa_supplicant_cancel_auth_timeout(wpa_s); wpa_supplicant_cancel_auth_timeout(wpa_s);
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
eapol_sm_notify_portValid(wpa_s->eapol, TRUE); eapol_sm_notify_portValid(wpa_s->eapol, true);
eapol_sm_notify_eap_success(wpa_s->eapol, TRUE); eapol_sm_notify_eap_success(wpa_s->eapol, true);
} else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X) && } else if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X) &&
wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) { wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) {
/* /*
@ -3101,7 +3101,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
* to allow EAPOL supplicant to complete its work without * to allow EAPOL supplicant to complete its work without
* waiting for WPA supplicant. * waiting for WPA supplicant.
*/ */
eapol_sm_notify_portValid(wpa_s->eapol, TRUE); eapol_sm_notify_portValid(wpa_s->eapol, true);
} }
wpa_s->last_eapol_matches_bssid = 0; wpa_s->last_eapol_matches_bssid = 0;
@ -4182,8 +4182,8 @@ static void wpa_supplicant_event_port_authorized(struct wpa_supplicant *wpa_s)
if (wpa_s->wpa_state == WPA_ASSOCIATED) { if (wpa_s->wpa_state == WPA_ASSOCIATED) {
wpa_supplicant_cancel_auth_timeout(wpa_s); wpa_supplicant_cancel_auth_timeout(wpa_s);
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
eapol_sm_notify_portValid(wpa_s->eapol, TRUE); eapol_sm_notify_portValid(wpa_s->eapol, true);
eapol_sm_notify_eap_success(wpa_s->eapol, TRUE); eapol_sm_notify_eap_success(wpa_s->eapol, true);
wpa_s->drv_authorized_port = 1; wpa_s->drv_authorized_port = 1;
} }
} }

View File

@ -828,7 +828,7 @@ no_fils:
" (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid), " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
wpa_ssid_txt(params.ssid, params.ssid_len), params.freq); wpa_ssid_txt(params.ssid, params.ssid_len), params.freq);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, false);
wpa_clear_keys(wpa_s, bss->bssid); wpa_clear_keys(wpa_s, bss->bssid);
wpa_supplicant_set_state(wpa_s, WPA_AUTHENTICATING); wpa_supplicant_set_state(wpa_s, WPA_AUTHENTICATING);
if (old_ssid != wpa_s->current_ssid) if (old_ssid != wpa_s->current_ssid)

View File

@ -319,14 +319,14 @@ void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s)
* per-BSSID EAPOL authentication. * per-BSSID EAPOL authentication.
*/ */
eapol_sm_notify_portControl(wpa_s->eapol, ForceAuthorized); eapol_sm_notify_portControl(wpa_s->eapol, ForceAuthorized);
eapol_sm_notify_eap_success(wpa_s->eapol, TRUE); eapol_sm_notify_eap_success(wpa_s->eapol, true);
eapol_sm_notify_eap_fail(wpa_s->eapol, FALSE); eapol_sm_notify_eap_fail(wpa_s->eapol, false);
return; return;
} }
#endif /* CONFIG_IBSS_RSN */ #endif /* CONFIG_IBSS_RSN */
eapol_sm_notify_eap_success(wpa_s->eapol, FALSE); eapol_sm_notify_eap_success(wpa_s->eapol, false);
eapol_sm_notify_eap_fail(wpa_s->eapol, FALSE); eapol_sm_notify_eap_fail(wpa_s->eapol, false);
if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE || if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE ||
wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE) wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE)
@ -1160,7 +1160,7 @@ int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s)
* Clear forced success to clear EAP state for next * Clear forced success to clear EAP state for next
* authentication. * authentication.
*/ */
eapol_sm_notify_eap_success(wpa_s->eapol, FALSE); eapol_sm_notify_eap_success(wpa_s->eapol, false);
} }
eapol_sm_notify_config(wpa_s->eapol, NULL, NULL); eapol_sm_notify_config(wpa_s->eapol, NULL, NULL);
wpa_sm_set_config(wpa_s->wpa, NULL); wpa_sm_set_config(wpa_s->wpa, NULL);
@ -4751,12 +4751,12 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
wpa_sm_rx_eapol(wpa_s->wpa, src_addr, buf, len); wpa_sm_rx_eapol(wpa_s->wpa, src_addr, buf, len);
else if (wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) { else if (wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) {
/* /*
* Set portValid = TRUE here since we are going to skip 4-way * Set portValid = true here since we are going to skip 4-way
* handshake processing which would normally set portValid. We * handshake processing which would normally set portValid. We
* need this to allow the EAPOL state machines to be completed * need this to allow the EAPOL state machines to be completed
* without going through EAPOL-Key handshake. * without going through EAPOL-Key handshake.
*/ */
eapol_sm_notify_portValid(wpa_s->eapol, TRUE); eapol_sm_notify_portValid(wpa_s->eapol, true);
} }
} }
@ -6185,8 +6185,8 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
} }
/* RSNA Supplicant Key Management - INITIALIZE */ /* RSNA Supplicant Key Management - INITIALIZE */
eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE); eapol_sm_notify_portEnabled(wpa_s->eapol, false);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE); eapol_sm_notify_portValid(wpa_s->eapol, false);
/* Initialize driver interface and register driver event handler before /* Initialize driver interface and register driver event handler before
* L2 receive handler so that association events are processed before * L2 receive handler so that association events are processed before