SAE: Set special Sc value when moving to Accepted state

Set Sc to 2^16-1 when moving to Accepted state per IEEE Std 802.11-2016,
12.4.8.6.5 (Protocol instance behavior - Confirmed state). This allows
the peer in Accepted state to silently ignore unnecessary
retransmissions of the Confirm message.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-12-27 12:17:44 +02:00
parent abcbd0604c
commit c4fc7e31c7
2 changed files with 3 additions and 1 deletions

View file

@ -728,6 +728,7 @@ static int sae_sm_step(struct hostapd_data *hapd, struct sta_info *sta,
sae_set_retransmit_timer(hapd, sta); sae_set_retransmit_timer(hapd, sta);
} else { } else {
sta->sae->send_confirm = 0xffff;
sae_accept_sta(hapd, sta); sae_accept_sta(hapd, sta);
} }
break; break;

View file

@ -1235,7 +1235,8 @@ void sae_write_confirm(struct sae_data *sae, struct wpabuf *buf)
/* Send-Confirm */ /* Send-Confirm */
sc = wpabuf_put(buf, 0); sc = wpabuf_put(buf, 0);
wpabuf_put_le16(buf, sae->send_confirm); wpabuf_put_le16(buf, sae->send_confirm);
sae->send_confirm++; if (sae->send_confirm < 0xffff)
sae->send_confirm++;
if (sae->tmp->ec) if (sae->tmp->ec)
sae_cn_confirm_ecc(sae, sc, sae->tmp->own_commit_scalar, sae_cn_confirm_ecc(sae, sc, sae->tmp->own_commit_scalar,