module: network: hardcode type to "wlan" when we see NL80211_CMD_NEW_INTERFACE

Wlan interfaces apparently report themselves as ARPHRD_ETHER in their
ifinfomsg struct (despite there being a ARPHRD_IEEE80211 type...).

"Fix" by hardcoding the type to "wlan" when we receive a
NL80211_CMD_NEW_INTERFACE message.
This commit is contained in:
Daniel Eklöf 2024-04-30 10:40:14 +02:00
parent 699c563051
commit 54902f46ab
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1370,6 +1370,8 @@ parse_genl_reply(struct module *mod, const struct nlmsghdr *hdr, size_t len)
continue;
LOG_DBG("%s: got interface information", iface->name);
free(iface->type);
iface->type = strdup("wlan");
foreach_nlattr(mod, iface, genl, msg_size, &handle_nl80211_new_interface, NULL);
break;