From c2735934347b2c44a3612c719f8e30731b80b0e4 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Tue, 17 May 2011 06:44:06 -0600 Subject: [PATCH] Bug 3215: Malformed IPv6 DNS reverse lookup --- lib/rfc3596.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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."); -- 2.47.2