From 4e96dbd7f7fefed3a7a79e7cabc0c3c08bd5623a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 24 Oct 2021 17:35:15 +0200 Subject: [PATCH] =?UTF-8?q?network:=20don=E2=80=99t=20send=20nl80211=20req?= =?UTF-8?q?uest=20if=20we=20don=E2=80=99t=20have=20a=20family-id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes an issue where we sometimes failed to retrieve the SSID; we sent one initial request before the family ID had been set. Then, we received the family ID and tried to send another request. However, if the first request was still in progress, the second request was never made. Since the first request lacked the family ID, that response didn’t contain anything useful. --- modules/network.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/network.c b/modules/network.c index bf32c57..117f687 100644 --- a/modules/network.c +++ b/modules/network.c @@ -310,6 +310,9 @@ send_nl80211_request(struct private *m, uint8_t cmd, uint16_t flags, uint32_t se if (m->ifindex < 0) return false; + if (m->nl80211.family_id == (uint16_t)-1) + return false; + const struct { struct nlmsghdr hdr; struct {