From 2820565ea35791a45b0f897b3c15e9c4527d6d67 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 Aug 2006 15:16:37 +0000 Subject: 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 --- src/dns.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/dns.cpp') 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; -- cgit v1.3.1-10-gc9f91