3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:39:39 +01:00

netdev: move ocvc setting to after connected check

We cannot check 'handshake' until first checking that IWD is
connected.
This commit is contained in:
James Prestwood 2022-04-05 11:21:41 -07:00 committed by Denis Kenzior
parent f7dc05969f
commit cb76f219fb

View File

@ -4990,8 +4990,7 @@ static void netdev_sa_query_req_frame_event(const struct mmpdu_header *hdr,
uint16_t transaction;
const uint8_t *oci;
struct netdev *netdev = user_data;
bool ocvc = netdev->handshake->supplicant_ocvc &&
netdev->handshake->authenticator_ocvc;
bool ocvc;
if (body_len < 4) {
l_debug("SA Query request too short");
@ -5001,6 +5000,9 @@ static void netdev_sa_query_req_frame_event(const struct mmpdu_header *hdr,
if (!netdev->connected)
return;
ocvc = netdev->handshake->supplicant_ocvc &&
netdev->handshake->authenticator_ocvc;
/* only care about SA Queries from our connected AP */
if (memcmp(hdr->address_2, netdev->handshake->aa, 6))
return;