Browse Source

ip6: enable ip6_autoconfig_enabled by default

See bug #56135

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
Gao Qingshui 6 years ago
parent
commit
a9ac18aebb
4 changed files with 2 additions and 7 deletions
  1. 0 3
      contrib/examples/example_app/test.c
  2. 0 1
      doc/NO_SYS_SampleCode.c
  3. 2 2
      src/core/netif.c
  4. 0 1
      test/fuzz/fuzz.c

+ 0 - 3
contrib/examples/example_app/test.c

@@ -371,9 +371,6 @@ test_netif_init(void)
 #endif
 #endif
 #if LWIP_IPV6
 #if LWIP_IPV6
   netif_create_ip6_linklocal_address(netif_default, 1);
   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)));
   printf("ip6 linklocal address: %s\n", ip6addr_ntoa(netif_ip6_addr(netif_default, 0)));
 #endif /* LWIP_IPV6 */
 #endif /* LWIP_IPV6 */
 #if LWIP_NETIF_STATUS_CALLBACK
 #if LWIP_NETIF_STATUS_CALLBACK

+ 0 - 1
doc/NO_SYS_SampleCode.c

@@ -73,7 +73,6 @@ main(void)
   netif.name[0] = 'e';
   netif.name[0] = 'e';
   netif.name[1] = '0';
   netif.name[1] = '0';
   netif_create_ip6_linklocal_address(&netif, 1);
   netif_create_ip6_linklocal_address(&netif, 1);
-  netif.ip6_autoconfig_enabled = 1;
   netif_set_status_callback(&netif, netif_status_callback);
   netif_set_status_callback(&netif, netif_status_callback);
   netif_set_default(&netif);
   netif_set_default(&netif);
   netif_set_up(&netif);
   netif_set_up(&netif);

+ 2 - 2
src/core/netif.c

@@ -342,8 +342,8 @@ netif_add(struct netif *netif,
 #endif /* LWIP_NUM_NETIF_CLIENT_DATA */
 #endif /* LWIP_NUM_NETIF_CLIENT_DATA */
 #if LWIP_IPV6
 #if LWIP_IPV6
 #if LWIP_IPV6_AUTOCONFIG
 #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 */
 #endif /* LWIP_IPV6_AUTOCONFIG */
   nd6_restart_netif(netif);
   nd6_restart_netif(netif);
 #endif /* LWIP_IPV6 */
 #endif /* LWIP_IPV6 */

+ 0 - 1
test/fuzz/fuzz.c

@@ -84,7 +84,6 @@ static err_t testif_init(struct netif *netif)
 
 
 #if LWIP_IPV6
 #if LWIP_IPV6
   netif->output_ip6 = ethip6_output;
   netif->output_ip6 = ethip6_output;
-  netif->ip6_autoconfig_enabled = 1;
   netif_create_ip6_linklocal_address(netif, 1);
   netif_create_ip6_linklocal_address(netif, 1);
   netif->flags |= NETIF_FLAG_MLD6;
   netif->flags |= NETIF_FLAG_MLD6;
 #endif
 #endif