summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dns.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 813c33030..1ce68f186 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -416,8 +416,8 @@ DNSResult DNS::GetResult()
* -- Thanks jilles for pointing this one out.
*/
#ifdef IPV6
- ipaddr_from = insp_ntoa(((sockaddr_in*)&from)->sin6_addr);
- port_from = ntohs(((sockaddr_in*)&from)->sin6_port);
+ ipaddr_from = insp_ntoa(((sockaddr_in6*)&from)->sin6_addr);
+ port_from = ntohs(((sockaddr_in6*)&from)->sin6_port);
#else
ipaddr_from = insp_ntoa(((sockaddr_in*)&from)->sin_addr);
port_from = ntohs(((sockaddr_in*)&from)->sin_port);