From 7dcbd235fc691ce360d0177c39c5d35f1856568b Mon Sep 17 00:00:00 2001 From: wangchen Date: Thu, 19 Sep 2024 10:42:54 +0800 Subject: [PATCH] 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 --- net/netdev/netdev_default.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netdev/netdev_default.c b/net/netdev/netdev_default.c index 6163197b402..a8454d07cda 100644 --- a/net/netdev/netdev_default.c +++ b/net/netdev/netdev_default.c @@ -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; } }