NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/42196: Parser for "/etc/resolv.conf" in "mdnsd" considered harmful

>Number:         42196
>Category:       bin
>Synopsis:       Parser for "/etc/resolv.conf" in "mdnsd" considered harmful
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 18 12:20:00 +0000 2009
>Release:        NetBSD 5.99.20
Matthias Scheler                        
System: NetBSD 5.99.20 NetBSD 5.99.20 (LYSSA) #0: Fri Oct 
16 09:54:46 BST 2009 
Architecture: i386
Machine: i386
"mdnsd" uses a home grown parser ("mDNSPosix.c", function "ParseDNSServers")
to parse "/etc/resolv.conf". This parser only understands "nameserver"
lines with IPv4 addresses in them. The DNS resolve in NetBSD's "libc"
however supports IPv6 addresses as well which makes this an viable
configuration option.

Configure only IPv6 nameservers in "/etc/resolv.conf".

None provided but it is eventually not very difficult.
From "mDNSPosix.c":

            mDNSAddr DNSAddr;
            DNSAddr.type = mDNSAddrType_IPv4;
            DNSAddr.ip.v4.NotAnInteger = ina.s_addr;
            mDNS_AddDNSServer(m, NULL, mDNSInterface_Any, &DNSAddr, 

It might be enough to call mDNS_AddDNSServer() with an IPv6 record
to fix this problem.

Home | Main Index | Thread Index | Old Index