FILS: Fix RSN info in FD frame for no-group-addressed

The value from the initial RSN_CIPHER_SUITE_NO_GROUP_ADDRESSED check
ended up getting overridden with the following if. This was supposed to
be a single if statement to avoid that.

Fixes: 9c02a0f5a6 ("FILS: Add generation of FILS Discovery frame template")
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-02-28 11:27:42 +02:00
parent 6035969e0e
commit 9a1136b7f1

View file

@ -1169,7 +1169,7 @@ bool wpa_auth_write_fd_rsn_info(struct wpa_authenticator *wpa_auth,
suite = wpa_cipher_to_suite(WPA_PROTO_RSN, conf->wpa_group); suite = wpa_cipher_to_suite(WPA_PROTO_RSN, conf->wpa_group);
if (suite == RSN_CIPHER_SUITE_NO_GROUP_ADDRESSED) if (suite == RSN_CIPHER_SUITE_NO_GROUP_ADDRESSED)
cipher = 63; /* No cipher suite selected */ cipher = 63; /* No cipher suite selected */
if ((suite >> 8) == 0x000fac && ((suite & 0xff) <= 13)) else if ((suite >> 8) == 0x000fac && ((suite & 0xff) <= 13))
cipher = suite & 0xff; cipher = suite & 0xff;
else else
cipher = 62; /* vendor specific */ cipher = 62; /* vendor specific */