From e46333496f880afe7ae2864967406f758aec55a7 Mon Sep 17 00:00:00 2001 From: xiao-mang <53597406+xiao-mang@users.noreply.github.com> Date: Thu, 16 May 2024 15:43:50 +0800 Subject: fix specified network card not taking effect with msh's ping error (#8937) * fix specified network card not taking effect with msh's ping error * fix specified network card not taking effect with msh's ping error --- components/net/netdev/src/netdev.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'components/net/netdev/src/netdev.c') diff --git a/components/net/netdev/src/netdev.c b/components/net/netdev/src/netdev.c index 8bc6e6bcca..e6398cf02e 100644 --- a/components/net/netdev/src/netdev.c +++ b/components/net/netdev/src/netdev.c @@ -1239,8 +1239,6 @@ int netdev_cmd_ping(char* target_name, char *netdev_name, rt_uint32_t times, rt_ if (!NETDEV_PING_IS_COMMONICABLE(netdev)) { - /* using first internet up status network interface device */ - netdev = netdev_get_first_by_flags(NETDEV_FLAG_LINK_UP); if (netdev == RT_NULL) { rt_kprintf("ping: not found available network interface device.\n"); -- cgit v1.3.1