summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-04 15:16:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-04 15:16:37 +0000
commit2820565ea35791a45b0f897b3c15e9c4527d6d67 (patch)
tree54cf44e906a1f9ac18780849a796308dabaa0bef /src/dns.cpp
parent425e2a649005beb72a258ddde76b56b0ffd15e40 (diff)
Fixes for ::0 ip's, disable autobind when using ::ffff: etc
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4703 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 0a22b28d8..0436095b6 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -645,6 +645,14 @@ DNSResult DNS::GetResult()
memmove(formatted,formatted + 1, strlen(formatted + 1) + 1);
}
resultstr = formatted;
+
+ /* Special case. Sending ::1 around between servers
+ * and to clients is dangerous, because the : on the
+ * start makes the client or server interpret the IP
+ * as the last parameter on the line with a value ":1".
+ */
+ if (*formatted == ':')
+ resultstr = "0" + resultstr;
}
break;