commit cb76f219fb3d0afd189f0a58e258577035f7431a
parent f7dc05969f928d2005ff45e77f5871ed00af5a30
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 5 Apr 2022 11:21:41 -0700
netdev: move ocvc setting to after connected check
We cannot check 'handshake' until first checking that IWD is
connected.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/netdev.c b/src/netdev.c
@@ -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;