From: Amos Jeffries Date: Tue, 17 May 2011 12:44:06 +0000 (-0600) Subject: Bug 3215: Malformed IPv6 DNS reverse lookup X-Git-Tag: SQUID_3_1_12_2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2735934347b2c44a3612c719f8e30731b80b0e4;p=thirdparty%2Fsquid.git Bug 3215: Malformed IPv6 DNS reverse lookup --- diff --git a/lib/rfc3596.c b/lib/rfc3596.c index 6fc0149a89..0a5fd49689 100644 --- a/lib/rfc3596.c +++ b/lib/rfc3596.c @@ -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.");