network: don’t send nl80211 request if we don’t have a family-id

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.
This commit is contained in:
Daniel Eklöf 2021-10-24 17:35:15 +02:00
parent cad9dd8efd
commit 4e96dbd7f7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -310,6 +310,9 @@ send_nl80211_request(struct private *m, uint8_t cmd, uint16_t flags, uint32_t se
if (m->ifindex < 0) if (m->ifindex < 0)
return false; return false;
if (m->nl80211.family_id == (uint16_t)-1)
return false;
const struct { const struct {
struct nlmsghdr hdr; struct nlmsghdr hdr;
struct { struct {