From a9ac18aebb5d940540e9c8323b201972bfae3435 Mon Sep 17 00:00:00 2001 From: Gao Qingshui Date: Sun, 14 Apr 2019 12:26:08 +0200 Subject: [PATCH] ip6: enable ip6_autoconfig_enabled by default See bug #56135 Signed-off-by: Simon Goldschmidt --- contrib/examples/example_app/test.c | 3 --- doc/NO_SYS_SampleCode.c | 1 - src/core/netif.c | 4 ++-- test/fuzz/fuzz.c | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/contrib/examples/example_app/test.c b/contrib/examples/example_app/test.c index 563d5710..95cca1f1 100644 --- a/contrib/examples/example_app/test.c +++ b/contrib/examples/example_app/test.c @@ -371,9 +371,6 @@ test_netif_init(void) #endif #if LWIP_IPV6 netif_create_ip6_linklocal_address(netif_default, 1); -#if LWIP_IPV6_AUTOCONFIG - netif_default->ip6_autoconfig_enabled = 1; -#endif printf("ip6 linklocal address: %s\n", ip6addr_ntoa(netif_ip6_addr(netif_default, 0))); #endif /* LWIP_IPV6 */ #if LWIP_NETIF_STATUS_CALLBACK diff --git a/doc/NO_SYS_SampleCode.c b/doc/NO_SYS_SampleCode.c index 71f1c9f7..b263420c 100644 --- a/doc/NO_SYS_SampleCode.c +++ b/doc/NO_SYS_SampleCode.c @@ -73,7 +73,6 @@ main(void) netif.name[0] = 'e'; netif.name[1] = '0'; netif_create_ip6_linklocal_address(&netif, 1); - netif.ip6_autoconfig_enabled = 1; netif_set_status_callback(&netif, netif_status_callback); netif_set_default(&netif); netif_set_up(&netif); diff --git a/src/core/netif.c b/src/core/netif.c index fd91b31a..a4b5bf61 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -342,8 +342,8 @@ netif_add(struct netif *netif, #endif /* LWIP_NUM_NETIF_CLIENT_DATA */ #if LWIP_IPV6 #if LWIP_IPV6_AUTOCONFIG - /* IPv6 address autoconfiguration not enabled by default */ - netif->ip6_autoconfig_enabled = 0; + /* IPv6 address autoconfiguration should be enabled by default */ + netif->ip6_autoconfig_enabled = 1; #endif /* LWIP_IPV6_AUTOCONFIG */ nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ diff --git a/test/fuzz/fuzz.c b/test/fuzz/fuzz.c index 50260a62..d472e160 100644 --- a/test/fuzz/fuzz.c +++ b/test/fuzz/fuzz.c @@ -84,7 +84,6 @@ static err_t testif_init(struct netif *netif) #if LWIP_IPV6 netif->output_ip6 = ethip6_output; - netif->ip6_autoconfig_enabled = 1; netif_create_ip6_linklocal_address(netif, 1); netif->flags |= NETIF_FLAG_MLD6; #endif