Skip to content

Commit b8bb015

Browse files
Fix the compilation error when lwip ipv6 num address > 8 (project-chip#38785)
1 parent 6eaa54b commit b8bb015

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/platform/ESP32/DiagnosticDataProviderImpl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface **
193193
esp_netif_t * netif = esp_netif_next(NULL);
194194
NetworkInterface * head = NULL;
195195
uint8_t ipv6_addr_count = 0;
196-
esp_ip6_addr_t ip6_addr[kMaxIPv6AddrCount];
196+
esp_ip6_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES];
197197
if (netif == NULL)
198198
{
199199
ChipLogError(DeviceLayer, "Failed to get network interfaces");
@@ -245,7 +245,6 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface **
245245
#endif
246246

247247
static_assert(kMaxIPv6AddrCount <= UINT8_MAX, "Count might not fit in ipv6_addr_count");
248-
static_assert(ArraySize(ip6_addr) >= LWIP_IPV6_NUM_ADDRESSES, "Not enough space for our addresses.");
249248
auto addr_count = esp_netif_get_all_ip6(ifa, ip6_addr);
250249
if (addr_count < 0)
251250
{

0 commit comments

Comments
 (0)