mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
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:
@@ -75,9 +75,9 @@ FAR struct net_driver_s *netdev_default(void)
|
|||||||
* device).
|
* device).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ret = dev;
|
|
||||||
if (dev->d_lltype != NET_LL_LOOPBACK)
|
if (dev->d_lltype != NET_LL_LOOPBACK)
|
||||||
{
|
{
|
||||||
|
ret = dev;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user