Parcourir la source

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>
Jouni Malinen il y a 7 ans
Parent
commit
c4fc7e31c7
2 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 1 0
      src/ap/ieee802_11.c
  2. 2 1
      src/common/sae.c

+ 1 - 0
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;

+ 2 - 1
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,