summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
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;