bin/54464: dig -x with ipv6-address is broken.
Stefan `Sec` Zehl
sec at 42.org
Mon Jul 14 01:30:25 PDT 2003
>Number: 54464
>Category: bin
>Synopsis: dig -x with ipv6-address is broken.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 14 01:30:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Stefan `Sec` Zehl
>Release: FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD ice 4.8-STABLE FreeBSD 4.8-STABLE #2: Sat Jul 5 19:52:29 CEST 2003 root at ice:/export/obj/export/src/sys/ICE i386
FreeBSD 4.8-STABLE from last week.
>Description:
dig -x <v6addr> should convert the address to .ip6.arpa notation
before looking it up.
However this code has a bug, and does this incorrectly
>How-To-Repeat:
| ice:~>dig +qu -x 2001:608:8:0:0:0:0:1
|
[...]
| ;; QUERY SECTION:
| ;;
| 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.0.0.0.0.0.6.0.1.0.0.2.ip6.arpa, type = ANY, class = IN
There is clearly one '8' missing, the correct string should be:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.0.0.0.8.0.6.0.1.0.0.2.ip6.arpa
from googling, this appears to have already been fixed in the bind-8.4.0
release.
>Fix:
a simple cut&paste error in reverse6();
--- contrib/bind/bin/dig/dig.c.org Fri Jul 12 12:24:59 2002
+++ contrib/bind/bin/dig/dig.c Mon Jul 14 10:15:17 2003
@@ -1799,7 +1799,7 @@
in6->s6_addr[6] & 0x0f, (in6->s6_addr[6] >> 4) & 0x0f,
in6->s6_addr[5] & 0x0f, (in6->s6_addr[5] >> 4) & 0x0f,
in6->s6_addr[4] & 0x0f, (in6->s6_addr[4] >> 4) & 0x0f,
- in6->s6_addr[6] & 0x0f, (in6->s6_addr[3] >> 4) & 0x0f,
+ in6->s6_addr[3] & 0x0f, (in6->s6_addr[3] >> 4) & 0x0f,
in6->s6_addr[2] & 0x0f, (in6->s6_addr[2] >> 4) & 0x0f,
in6->s6_addr[1] & 0x0f, (in6->s6_addr[1] >> 4) & 0x0f,
in6->s6_addr[0] & 0x0f, (in6->s6_addr[0] >> 4) & 0x0f);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list