From 5b0d9338fd5f2c90e3cbd40970bc11f16631b17c Mon Sep 17 00:00:00 2001 From: Joel Cunningham Date: Mon, 27 Jul 2015 00:22:30 +0200 Subject: [PATCH] netif, loopif: set link up on loopback interface When LWIP_HAVE_LOOPIF is enabled, a separate loopback interface is added as a netif. A netif need to have its link state set to up to be able to be selected as a route in ip4_route or ip6_route. The regression appears to be when bug #43904 (ip_route() and ip6_route() must detect linkup status) was fixed. Furthermore, there is no point of having the loopif down by default. --- src/core/netif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/netif.c b/src/core/netif.c index dbf387cc..1de9613b 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -159,6 +159,7 @@ netif_init(void) loop_netif.ip6_addr_state[0] = IP6_ADDR_VALID; #endif /* LWIP_IPV6 */ + netif_set_link_up(&loop_netif); netif_set_up(&loop_netif); #endif /* LWIP_HAVE_LOOPIF */