case SIOCGIWNAME: add filter out non-802.11 interfaces

netdev_wifr_ioctl SIOCGIWNAME cmd, need to filter out non-802.11 interfaces

Signed-off-by: zhangjun21 <zhangjun21@xiaomi.com>
This commit is contained in:
zhangjun21
2023-11-21 16:59:07 +08:00
committed by Xiang Xiao
parent 6493022047
commit d21f10bea6
+1 -1
View File
@@ -630,7 +630,7 @@ static int netdev_wifr_ioctl(FAR struct socket *psock, int cmd,
dev = netdev_findbyname(req->ifr_name);
if (cmd == SIOCGIWNAME)
{
if (dev == NULL)
if (dev == NULL || dev->d_lltype != NET_LL_IEEE80211)
{
ret = -ENODEV;
}