]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Set special Sc value when moving to Accepted state
authorJouni Malinen <j@w1.fi>
Wed, 27 Dec 2017 10:17:44 +0000 (12:17 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 27 Dec 2017 10:19:08 +0000 (12:19 +0200)
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>
src/ap/ieee802_11.c
src/common/sae.c

index 53672a7d2124848dec8df1d77dbff34e4149a970..f6cea4017dde9abfd238098d09a851bfba2da384 100644 (file)
@@ -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;
index 588a62205f3da44f7475df20eb744b2b2b9d187f..3b3249092836b0a1cfbe7411b2ae51d6f7336512 100644 (file)
@@ -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,