Set IP address type only when IPv4 and IPv6 are both enabled (#5595)

This commit is contained in:
Keith Burzinski 2023-10-23 18:43:54 -05:00 committed by Jesse Hills
parent 0104bf3fc8
commit 96dc7f0259
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -36,7 +36,7 @@ struct IPAddress {
IPAddress(const std::string &in_address) { ipaddr_aton(in_address.c_str(), &ip_addr_); }
IPAddress(ip4_addr_t *other_ip) {
memcpy((void *) &ip_addr_, (void *) other_ip, sizeof(ip4_addr_t));
#if USE_ESP32
#if USE_ESP32 && LWIP_IPV6
ip_addr_.type = IPADDR_TYPE_V4;
#endif
}