From arnt@gulbrandsen.priv.no  Wed Jul  9 13:16:33 2003
Return-Path: <arnt@gulbrandsen.priv.no>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8862D37B404
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  9 Jul 2003 13:16:33 -0700 (PDT)
Received: from fri.gulbrandsen.priv.no (fri.gulbrandsen.priv.no [217.19.171.134])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9D07D43F93
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  9 Jul 2003 13:16:32 -0700 (PDT)
	(envelope-from arnt@gulbrandsen.priv.no)
Received: by fri.gulbrandsen.priv.no (Postfix, from userid 1001)
	id F12E454BB; Wed,  9 Jul 2003 22:16:30 +0200 (CEST)
Message-Id: <20030709201630.F12E454BB@fri.gulbrandsen.priv.no>
Date: Wed,  9 Jul 2003 22:16:30 +0200 (CEST)
From: Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>
To: FreeBSD-gnats-submit@freebsd.org
Cc: arnt@gulbrandsen.priv.no
Subject: dig misparses many IPv6 addresses
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         54278
>Category:       bin
>Synopsis:       dig misparses many IPv6 addresses
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 09 13:20:19 PDT 2003
>Closed-Date:    Sat Jul 12 23:07:20 PDT 2003
>Last-Modified:  Sat Jul 12 23:07:20 PDT 2003
>Originator:     Arnt Gulbrandsen
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
In this capacity, private
>Environment:
System: FreeBSD fri.gulbrandsen.priv.no 4.8-STABLE FreeBSD 4.8-STABLE #5: Wed Jun 18 19:09:03 CEST 2003 arnt@fri.gulbrandsen.priv.no:/usr/obj/usr/src/sys/FRI i386

>Description:

dig in 4.8-STABLE misparses many IPv6 addresses (including all of mine).
In a command such as "dig -x 2001:608:c:4::1", for example, the :608: is
misparsed.

dig from bind9 apparently does not have the problem.

>How-To-Repeat:

I just cvsup'd to test the latest and greatest -STABLE (2003-07-09), and
see:

$ /usr/obj/usr/src/usr.bin/dig/dig @212.125.101.207 -x 2001:608:c:4::1
 
; <<>> DiG 8.3 <<>> @212.125.101.207 -x
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 13
;; QUERY SECTION:
;;      1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.c.0.0.0.0.0.6.0.1.0.0.2.ip6.arpa, type = ANY, class = IN

Note that .0.0.6.0.: It should be .8.0.6.0., to match :608:.

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 12 23:07:02 PDT 2003 
State-Changed-Why:  
BIND is not maintained by FreeBSD.  Please take this up with 
the BIND developers instead. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54278 
>Unformatted:
