]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3215: Malformed ipv6 DNS reverse lookup
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 7 May 2011 12:24:15 +0000 (00:24 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 7 May 2011 12:24:15 +0000 (00:24 +1200)
lib/rfc3596.c

index 3d64b104f4edfb8fa38bb349cf06b6065c484ba8..fa929cb4ca69cc65cb5e3641114bfb82d6dd4eef 100644 (file)
@@ -188,7 +188,7 @@ rfc3596BuildPTRQuery6(const struct in6_addr addr, char *buf, size_t sz, unsigned
     /* work from the raw addr field. anything else may have representation changes. */
     /* The sin6_port and sin6_addr members shall be in network byte order. */
     for (i = 15; i >= 0; i--, p+=4) {
-        snprintf(p, 5, "%1x.%1x.", ((r[i]>>4)&0xf), (r[i])&0xf );
+        snprintf(p, 5, "%1x.%1x.", ((r[i])&0xf), (r[i]>>4)&0xf );
     }
 
     snprintf(p,10,"ip6.arpa.");