net: Remove IFF_DOWN flag to compatible with Linux/*BSD

turn off interface by checking IFF_UP flag isn't set:
https://github.com/apache/nuttx/issues/1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2024-10-06 15:22:19 +08:00
committed by GUIDINGLI
parent 58e5bc7e74
commit 9b8a02749f
4 changed files with 3 additions and 10 deletions

View File

@@ -118,8 +118,6 @@ int netlib_ifdown(const char *ifname)
/* Perform the ioctl to ifup flag */
req.ifr_flags |= IFF_DOWN;
ret = ioctl(sockfd, SIOCSIFFLAGS, (unsigned long)&req);
close(sockfd);
}