diff --git a/src/server/addr.c b/src/server/addr.c index 14f44c6..a21b845 100644 --- a/src/server/addr.c +++ b/src/server/addr.c @@ -9,12 +9,12 @@ void create_ip_addr(uint8_t* domain, IpAddr* addr) { addr->type = V4; - memcpy(&addr->data.v4.s_addr, domain, 4); + memcpy(&addr->data.v4, domain, 4); } void create_ip_addr6(uint8_t* domain, IpAddr* addr) { addr->type = V6; - memcpy(&addr->data.v6.__in6_u.__u6_addr8, domain, 16); + memcpy(&addr->data.v6, domain, 16); } void ip_addr_any(IpAddr* addr) {