]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3215: Malformed IPv6 DNS reverse lookup
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 17 May 2011 12:44:06 +0000 (06:44 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 17 May 2011 12:44:06 +0000 (06:44 -0600)
lib/rfc3596.c

index 6fc0149a8988a767ba3ef0bd3f6de31f0a2abc09..0a5fd4968924fc470ae51ff6f17d771db1974824 100644 (file)
@@ -190,7 +190,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.");