mirror of
https://github.com/apache/nuttx.git
synced 2026-05-11 07:48:59 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user