netdev:In netdev_default,If there is only one loopback network devices, it returns NULL

Referring to Linux,if there is only a loopback network device and the destination address does not belong to the loopback address, then the loopback network devices is not selected

Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
wangchen
2024-09-19 10:42:54 +08:00
committed by Xiang Xiao
parent b5b0430c39
commit 7dcbd235fc
+1 -1
View File
@@ -75,9 +75,9 @@ FAR struct net_driver_s *netdev_default(void)
* device).
*/
ret = dev;
if (dev->d_lltype != NET_LL_LOOPBACK)
{
ret = dev;
break;
}
}