aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-12-27 10:17:44 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-27 10:19:08 (GMT)
commitc4fc7e31c7d520ba9c1f989fd6f8cc727aee1d60 (patch)
tree4b4cab654a84bc9e5fab65bd962ed0ed1ccc060b
parentabcbd0604cc604bc62b6d47d30559111447ea88c (diff)
downloadhostap-c4fc7e31c7d520ba9c1f989fd6f8cc727aee1d60.zip
hostap-c4fc7e31c7d520ba9c1f989fd6f8cc727aee1d60.tar.gz
hostap-c4fc7e31c7d520ba9c1f989fd6f8cc727aee1d60.tar.bz2
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>
-rw-r--r--src/ap/ieee802_11.c1
-rw-r--r--src/common/sae.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 53672a7..f6cea40 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -728,6 +728,7 @@ static int sae_sm_step(struct hostapd_data *hapd, struct sta_info *sta,
sae_set_retransmit_timer(hapd, sta);
} else {
+ sta->sae->send_confirm = 0xffff;
sae_accept_sta(hapd, sta);
}
break;
diff --git a/src/common/sae.c b/src/common/sae.c
index 588a622..3b32490 100644
--- a/src/common/sae.c
+++ b/src/common/sae.c
@@ -1235,7 +1235,8 @@ void sae_write_confirm(struct sae_data *sae, struct wpabuf *buf)
/* Send-Confirm */
sc = wpabuf_put(buf, 0);
wpabuf_put_le16(buf, sae->send_confirm);
- sae->send_confirm++;
+ if (sae->send_confirm < 0xffff)
+ sae->send_confirm++;
if (sae->tmp->ec)
sae_cn_confirm_ecc(sae, sc, sae->tmp->own_commit_scalar,