NetBSD-Bugs archive

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

bin/46758: mdnsd uses the IP address 1.1.1.1



>Number:         46758
>Category:       bin
>Synopsis:       mdnsd uses the IP address 1.1.1.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 30 22:50:00 +0000 2012
>Originator:     Lloyd Parkes
>Release:        6.0_BETA2
>Organization:
>Environment:
NetBSD bob64 6.0_BETA2 NetBSD 6.0_BETA2 (GENERIC) #0:... (in a VM, no cut and 
paste)
>Description:
mdnsd tries to build a UDP connection to 1.1.1.1:1 in order to determine the 
local IP address. Even though this particular code generates no IP traffic, the 
use of the address 1.1.1.1 is wrong. That's a public IP address that can't be 
issued because there is so much software that uses it as a dummy address and we 
don't need to be part of the problem.

Also, maybe replace the use of UDP port 1 (tcpmux) with UDP port 7 (echo) might 
also be better style.
>How-To-Repeat:
Run mdnsd with no IPv4 interfaces configured and ask yourself how 1.1.1.1 got 
into the "connection failed" error message that you see.
>Fix:
An address from the TEST-NET-2 range is more appropriate. This range is 
publicly routable and listed as "addresses within this block do not 
legitimately appear on the public Internet and can be used without any 
coordination with IANA or an Internet registry", which in turn means that we 
can use and it will trigger all the normal kernel routing machinery we need it 
to.

198.51.100.42 is a good number to use. 

The IP address change needs to be made in:
external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:mDNSPlatformSourceAddrForDest()

and the port number change needs to be made in:
external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:Reconfigure()



Home | Main Index | Thread Index | Old Index