Skip to content

Commit aad1041

Browse files
committed
Use correct array length for listing IPv6 addresses
1 parent 58520a7 commit aad1041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Ethernet/src/ETH.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ void ETHClass::printInfo(Print & out){
10501050
out.println();
10511051

10521052
static const char * types[] = { "UNKNOWN", "GLOBAL", "LINK_LOCAL", "SITE_LOCAL", "UNIQUE_LOCAL", "IPV4_MAPPED_IPV6" };
1053-
esp_ip6_addr_t if_ip6[5];
1053+
esp_ip6_addr_t if_ip6[CONFIG_LWIP_IPV6_NUM_ADDRESSES];
10541054
int v6addrs = esp_netif_get_all_ip6(_esp_netif, if_ip6);
10551055
for (int i = 0; i < v6addrs; ++i){
10561056
out.print(" ");

0 commit comments

Comments
 (0)