From 7fe8f030eea0015962e729eae1f1c309dc83a469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20D=C3=B6rre?= Date: Thu, 25 Aug 2022 17:26:37 +0000 Subject: [PATCH] rp2/lwip_inc: Enable IPv6 per default on rp2 port. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having IPv6 support is important, especially for IoT-Devices which might be many, requiring individual IP-addresses. In particular direct access via link-local addresses and having deterministic SLAAC-addresses can be quite convenient. Also in IPv6-only networks or for connecting to IPv6-only services, this is very useful. For the Pico W, there is enough flash and RAM that enabling IPv6 by default is the right choice. Should IPv6 support in a network exist (i.e. there are Router Advertisements), but not provide connectivity, connecting by domain name should not be a problem as DNS will default to return the IPv4-address (if that exists), unless reconfigured at runtime to prefer IPv6. In any case a user can disable obtaining SLAAC-addresses with: .ipconfig(autoconf6=False) Signed-off-by: Felix Dörre --- ports/rp2/lwip_inc/lwipopts.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/rp2/lwip_inc/lwipopts.h b/ports/rp2/lwip_inc/lwipopts.h index 691b228db5..5f37ecdac2 100644 --- a/ports/rp2/lwip_inc/lwipopts.h +++ b/ports/rp2/lwip_inc/lwipopts.h @@ -26,7 +26,10 @@ #define LWIP_NETIF_EXT_STATUS_CALLBACK 1 #define LWIP_NETIF_STATUS_CALLBACK 1 -#define LWIP_IPV6 0 +#define LWIP_IPV4 1 +#define LWIP_IPV6 1 +#define LWIP_ND6_NUM_DESTINATIONS 4 +#define LWIP_ND6_QUEUEING 0 #define LWIP_DHCP 1 #define LWIP_DHCP_CHECK_LINK_UP 1 #define DHCP_DOES_ARP_CHECK 0 // to speed DHCP up