diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 53672a7d2..f6cea4017 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 588a62205..3b3249092 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,