summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-03 21:24:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-03 21:24:08 +0000
commite5d7282652e3e0e36b0a1c32606fc645025c2e50 (patch)
tree22de2ba96ae498b6c91bb0fce40933135b768dd3
parent661e2cccbaee3d3e1db858fbe2d901c8e0f79b36 (diff)
Odd stuff with ::ffff ipv6 addresses
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4690 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/dns.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 6d624c181..15d0c5a58 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -257,6 +257,11 @@ DNS::DNS()
if (insp_aton(Config->DNSServer,&addr) > 0)
{
memcpy(&myserver,&addr,sizeof(insp_inaddr));
+ if (strstr(Config->DNSServer,"::ffff:") == Config->DNSServer)
+ {
+ /* These dont come back looking like they did when they went in. Reformat them */
+ strcpy(Config->DNSServer,insp_ntoa(myserver));
+ }
log(DEBUG,"Added nameserver '%s'",Config->DNSServer);
}
else