diff options
author | Adam <Adam@anope.org> | 2014-09-08 18:27:57 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-09-08 18:30:24 -0400 |
commit | 635cf9590b116eed03f38fc44bcdb96665f81f22 (patch) | |
tree | c86bab78006c5b7eee4018a9c9c4b170d25d1456 | |
parent | df67ab549bcc2cd53519f309110c58c00f2c935b (diff) |
Remove IPv6 address compaction.
This code is incorrect and can produce addresses with multiple double
colons. No other IRCds do this and most systems today will give us the
compact version anyway.
Issue #914
-rw-r--r-- | src/dns.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index 8ad94e9e1..977f4bad0 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -678,18 +678,6 @@ DNSResult DNS::GetResult() case DNS_QUERY_AAAA: { inet_ntop(AF_INET6, data.first, formatted, sizeof(formatted)); - char* c = strstr(formatted,":0:"); - if (c != NULL) - { - memmove(c+1,c+2,strlen(c+2) + 1); - c += 2; - while (memcmp(c,"0:",2) == 0) - memmove(c,c+2,strlen(c+2) + 1); - if (memcmp(c,"0",2) == 0) - *c = 0; - if (memcmp(formatted,"0::",3) == 0) - memmove(formatted,formatted + 1, strlen(formatted + 1) + 1); - } resultstr = formatted; /* Special case. Sending ::1 around between servers |