Subject: kern/17540: ICMPv6 NI_QTYPE_FQDN returns wrong name.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <popo@sfc.wide.ad.jp>
List: netbsd-bugs
Date: 07/09/2002 21:57:11
>Number:         17540
>Category:       kern
>Synopsis:       ICMPv6 NI_QTYPE_FQDN returns wrong name.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 09 21:58:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Keijiro Ehara
>Release:        NetBSD 1.6B
>Organization:
Keio University
>Environment:
NetBSD imaQ.sfc.wide.ad.jp 1.6B NetBSD 1.6B (POPO-SMALL.MP) #5: Fri Jul  5 04:43:10 JST 2002     popo@imaQ.sfc.wide.ad.jp:/usr/obj/POPO-SMALL.MP i386
>Description:
Some macros below are defined in sys/netinet6/icmp6.c.
#define isupper(x) ('A' <= (x) && (x) <= 'Z')
#define isalpha(x) (('A' <= (x) && (x) <= 'Z') || ('a' <= (x) && (x) <= 'z'))
#define isalnum(x) (isalpha(x) || ('0' <= (x) && (x) <= '9'))
#define tolower(x) (isupper(x) ? (x) + 'a' - 'A' : (x))

And func ni_nametodns() uses them by way of tolower(*p++),
so it becomes (isupper(*p++) ? (*p++) + 'a' - 'A' : (*p++)).

>How-To-Repeat:
Set hostname like mine.
Or just hit 'ping6 -w 3ffe:501:100c:d210:2e0:81ff:fe04:3727'

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: