mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
netdev: remove ASSERT when ifindex is invalid
There is no control over whether a valid index is input when user use ioctl to get netdev information, so removing this assertion will allow ENODEV to be returned. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -61,7 +61,6 @@ FAR struct net_driver_s *netdev_findbyindex(int ifindex)
|
||||
* POSIX to mean no interface index.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(ifindex > 0 && ifindex <= MAX_IFINDEX);
|
||||
if (ifindex < 1 || ifindex > MAX_IFINDEX)
|
||||
{
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user