NetBSD Problem Report #46758

From www@NetBSD.org  Mon Jul 30 22:45:12 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 67BE763BA27
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 30 Jul 2012 22:45:12 +0000 (UTC)
Message-Id: <20120730224511.4E34C63B8E6@www.NetBSD.org>
Date: Mon, 30 Jul 2012 22:45:11 +0000 (UTC)
From: lloyd@must-have-coffee.gen.nz
Reply-To: lloyd@must-have-coffee.gen.nz
To: gnats-bugs@NetBSD.org
Subject: mdnsd uses the IP address 1.1.1.1
X-Send-Pr-Version: www-1.0

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 30 22:50:00 +0000 2012
>Closed-Date:    Thu Oct 15 11:57:08 +0000 2015
>Last-Modified:  Sat Jun 03 15:35:03 +0000 2023
>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()

>Release-Note:

>Audit-Trail:
From: "Roy Marples" <roy@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46758 CVS commit: src/external/apache2/mDNSResponder/dist
Date: Thu, 15 Oct 2015 11:21:53 +0000

 Module Name:	src
 Committed By:	roy
 Date:		Thu Oct 15 11:21:53 UTC 2015

 Modified Files:
 	src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c
 	src/external/apache2/mDNSResponder/dist/mDNSShared: PlatformCommon.c

 Log Message:
 Derive our primary interface and address by trying to connect to an
 address in the TEST-NET-2 network as noted in RFC5737 instead of using
 the 1.1.1.1 address. Also, use port 7 (echo) for better style.
 Fixes PR bin/46758 thanks to Lloyd Parkes.

 While here, if we do fail to connect to the test address, don't spam
 this to the console as it's a common case during the boot sequence.


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 \
     src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
 cvs rdiff -u -r1.1.1.3 -r1.2 \
     src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: roy@NetBSD.org
State-Changed-When: Thu, 15 Oct 2015 11:57:08 +0000
State-Changed-Why:
Fixed


From: "Andrius Varanavicius" <andvar@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46758 CVS commit: src/external/apache2/mDNSResponder/dist
Date: Mon, 29 May 2023 21:16:58 +0000

 Module Name:	src
 Committed By:	andvar
 Date:		Mon May 29 21:16:58 UTC 2023

 Modified Files:
 	src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c
 	src/external/apache2/mDNSResponder/dist/mDNSShared: PlatformCommon.c

 Log Message:
 mdnsd(8): restore fixes for PR bin/46758, lost on resolving merge conflicts.
 Original commit message from Roy Marples:
 "Derive our primary interface and address by trying to connect to an
 address in the TEST-NET-2 network as noted in RFC5737 instead of using
 the 1.1.1.1 address. Also, use port 7 (echo) for better style.
 Fixes PR bin/46758 thanks to Lloyd Parkes."

 pullups needed for netbsd-9, netbsd-10.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 \
     src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
 cvs rdiff -u -r1.6 -r1.7 \
     src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46758 CVS commit: [netbsd-10] src/external/apache2/mDNSResponder/dist
Date: Sat, 3 Jun 2023 15:32:02 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jun  3 15:32:01 UTC 2023

 Modified Files:
 	src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-10]:
 	    PosixDaemon.c
 	src/external/apache2/mDNSResponder/dist/mDNSShared [netbsd-10]:
 	    PlatformCommon.c

 Log Message:
 Pull up following revision(s) (requested by andvar in ticket #193):

 	external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c: revision 1.7
 	external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 1.16

 mdnsd(8): restore fixes for PR bin/46758, lost on resolving merge conflicts.

 Original commit message from Roy Marples:
 "Derive our primary interface and address by trying to connect to an
 address in the TEST-NET-2 network as noted in RFC5737 instead of using
 the 1.1.1.1 address. Also, use port 7 (echo) for better style.
 Fixes PR bin/46758 thanks to Lloyd Parkes."


 To generate a diff of this commit:
 cvs rdiff -u -r1.14.6.1 -r1.14.6.2 \
     src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
 cvs rdiff -u -r1.6 -r1.6.6.1 \
     src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46758 CVS commit: [netbsd-9] src/external/apache2/mDNSResponder/dist
Date: Sat, 3 Jun 2023 15:34:30 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jun  3 15:34:30 UTC 2023

 Modified Files:
 	src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-9]:
 	    PosixDaemon.c
 	src/external/apache2/mDNSResponder/dist/mDNSShared [netbsd-9]:
 	    PlatformCommon.c

 Log Message:
 Pull up following revision(s) (requested by andvar in ticket #1641):

 	external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c: revision 1.7
 	external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 1.16

 mdnsd(8): restore fixes for PR bin/46758, lost on resolving merge conflicts.

 Original commit message from Roy Marples:
 "Derive our primary interface and address by trying to connect to an
 address in the TEST-NET-2 network as noted in RFC5737 instead of using
 the 1.1.1.1 address. Also, use port 7 (echo) for better style.
 Fixes PR bin/46758 thanks to Lloyd Parkes."


 To generate a diff of this commit:
 cvs rdiff -u -r1.12.4.2 -r1.12.4.3 \
     src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
 cvs rdiff -u -r1.5.4.1 -r1.5.4.2 \
     src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.