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

@@ -904,7 +904,7 @@ static int netinit_monitor(void)
ninfo("Taking the link down\n");
ifr.ifr_flags = IFF_DOWN;
ifr.ifr_flags = 0;
ret = ioctl(sd, SIOCSIFFLAGS, (unsigned long)&ifr);
if (ret < 0)
{