Skip to content

Commit

Permalink
Use correct array length for listing IPv6 addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Jan 12, 2024
1 parent 58520a7 commit aad1041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ void ETHClass::printInfo(Print & out){
out.println();

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

0 comments on commit aad1041

Please sign in to comment.