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.
This commit is contained in:
Joel Cunningham 2015-07-27 00:22:30 +02:00 committed by Sylvain Rochet
parent 409d7a99f9
commit 5b0d9338fd

View File

@ -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 */