mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Set IP address type
only when IPv4 and IPv6 are both enabled (#5595)
This commit is contained in:
parent
34dce0acbf
commit
cb2f5eb781
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ struct IPAddress {
|
||||||
IPAddress(const std::string &in_address) { ipaddr_aton(in_address.c_str(), &ip_addr_); }
|
IPAddress(const std::string &in_address) { ipaddr_aton(in_address.c_str(), &ip_addr_); }
|
||||||
IPAddress(ip4_addr_t *other_ip) {
|
IPAddress(ip4_addr_t *other_ip) {
|
||||||
memcpy((void *) &ip_addr_, (void *) other_ip, sizeof(ip4_addr_t));
|
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;
|
ip_addr_.type = IPADDR_TYPE_V4;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue