From 32de036490515f3d2ced152033a24a67fb563c5f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 25 Aug 2015 20:09:12 -0600 Subject: [PATCH] Local loopback: Set the IFF_UP flags during initialization because the local loopback device is always up --- Documentation | 2 +- configs | 2 +- drivers/net/loopback.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation b/Documentation index 8a30728ae9..ce750c0899 160000 --- a/Documentation +++ b/Documentation @@ -1 +1 @@ -Subproject commit 8a30728ae9a64496f0c9a0ff5dd62bd3b022c145 +Subproject commit ce750c0899c2138b37b52a48d020a3eceb92fd04 diff --git a/configs b/configs index e1e1873700..e3f37812a9 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit e1e1873700ffda7aeb632e2b1234333d88ce3457 +Subproject commit e3f37812a9a7595a7ddab1a625ebe857d104beb2 diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 5e2a12d1e3..83aa983657 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -49,6 +49,7 @@ #include #include +#include #include #include @@ -532,13 +533,16 @@ int localhost_initialize(void) net_ipv4addr_copy(priv->lo_dev.d_draddr, g_lo_ipv4addr); net_ipv4addr_copy(priv->lo_dev.d_netmask, g_lo_ipv4mask); #endif + #ifdef CONFIG_NET_IPv6 net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr); net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr); net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr); #endif + /* Put the network in the UP state */ + priv->lo_dev.d_flags = IFF_UP; return lo_ifup(&priv->lo_dev); }