This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bd19065933 net/loopback: Fix flags of lo device
bd19065933 is described below
commit bd19065933ea00297223911cb11e79670c9f959c
Author: Zhe Weng <[email protected]>
AuthorDate: Wed Nov 29 14:36:26 2023 +0800
net/loopback: Fix flags of lo device
netdev_register will set IFF_LOOPBACK in d_flags, we should not just
change it into IFF_UP only.
Signed-off-by: Zhe Weng <[email protected]>
---
drivers/net/loopback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index a6c8b08a95..30ad792dc9 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -357,7 +357,7 @@ int localhost_initialize(void)
/* Put the network in the UP state */
- priv->lo_dev.d_flags = IFF_UP;
+ IFF_SET_UP(priv->lo_dev.d_flags);
return lo_ifup(&priv->lo_dev);
}