From 5c4e391c2d6ab4685cef1b7fa11b5b38cd8ebb25 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 8 May 2011 00:24:15 +1200 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 3d64b104f4..fa929cb4ca 100644 --- a/lib/rfc3596.c +++ b/lib/rfc3596.c @@ -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."); -- 2.47.2