lwip: Enable IPv6 stateless address autoconfiguration

This commit is contained in:
xiehang
2020-01-09 16:54:54 +08:00
parent b4eaf11fe5
commit 066ffe0abb
3 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -1053,7 +1053,7 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d
return ip4_frag(p, netif, dest);
}
#else
LWIP_ERROR("ip4_output_if: Packets larger than MTU, discarded!!!",!(netif->mtu && p->tot_len > netif->mtu),return ERR_IF;);
LWIP_ERROR("ip4_output_if: Packets larger than MTU, discarded!!!",!(netif->mtu && p->tot_len > netif->mtu),return ERR_IF;);
#endif /* IP_FRAG */
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
+4
View File
@@ -331,8 +331,12 @@ netif_add(struct netif *netif,
#endif /* LWIP_NUM_NETIF_CLIENT_DATA */
#if LWIP_IPV6
#if LWIP_IPV6_AUTOCONFIG
#if ESP_IPV6_AUTOCONFIG
netif->ip6_autoconfig_enabled = 1;
#else
/* IPv6 address autoconfiguration not enabled by default */
netif->ip6_autoconfig_enabled = 0;
#endif
#endif /* LWIP_IPV6_AUTOCONFIG */
nd6_restart_netif(netif);
#endif /* LWIP_IPV6 */
+7
View File
@@ -1010,6 +1010,13 @@
#define LWIP_DHCP_AUTOIP_COOP 0
#endif
/**
* ESP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862.
*/
#if !defined ESP_IPV6_AUTOCONFIG
#define ESP_IPV6_AUTOCONFIG 0
#endif
/**
* LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes
* that should be sent before falling back on AUTOIP (the DHCP client keeps