From 635cf9590b116eed03f38fc44bcdb96665f81f22 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 8 Sep 2014 18:27:57 -0400 Subject: 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 --- src/dns.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/dns.cpp') 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 -- cgit v1.2.3