# HG changeset patch # User Richard Lowe # Date 1286232316 14400 # Node ID f4ee39d1ce08067b4ddf947836ca23d49d6728f4 # Parent 1b557c5c9727980cd184e9aa01c5208517d9f7a2 248 mdnsd fails to run inside zone due to broken code Reviewed by: garrett@nexenta.com Approved by: garrett@nexenta.com diff -r 1b557c5c9727 -r f4ee39d1ce08 usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile --- a/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile Fri Oct 01 20:02:51 2010 -0700 +++ b/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile Mon Oct 04 18:45:16 2010 -0400 @@ -21,7 +21,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" PROG= mdnsd MANIFEST= multicast.xml @@ -41,9 +40,9 @@ MDNSFLAGS= -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN \ - -DLOG_PERROR=0 -DHAVE_SOLARIS -DHAVE_SOLARIS_ZONES \ + -DLOG_PERROR=0 -DHAVE_SOLARIS \ -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME \ - -DHAVE_IPV6=1 -Dasm=__asm -DMDNSD_NOROOT \ + -DHAVE_IPV6=1 -Dasm=__asm -DMDNSD_NOROOT \ -DPID_FILE=\"\" -DMDNSD_USER=\"noaccess\" \ -DMDNS_VERSIONSTR_NODTS diff -r 1b557c5c9727 -r f4ee39d1ce08 usr/src/cmd/cmd-inet/usr.lib/mdnsd/mDNSUNP.c --- a/usr/src/cmd/cmd-inet/usr.lib/mdnsd/mDNSUNP.c Fri Oct 01 20:02:51 2010 -0700 +++ b/usr/src/cmd/cmd-inet/usr.lib/mdnsd/mDNSUNP.c Mon Oct 04 18:45:16 2010 -0400 @@ -17,122 +17,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - - Change History (most recent first): - -$Log: mDNSUNP.c,v $ -Revision 1.34 2006/08/14 23:24:47 cheshire -Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 - -Revision 1.33 2006/03/13 23:14:21 cheshire - Compile problems on FreeBSD -Use instead of - -Revision 1.32 2005/12/21 02:56:43 cheshire - get_ifi_info() should fake ifi_index when SIOCGIFINDEX undefined - -Revision 1.31 2005/12/21 02:46:05 cheshire - mDNSUNP.c needs to include on 4.4BSD Lite - -Revision 1.30 2005/11/29 20:03:02 mkrochma -Wrapped sin_len with #ifndef NOT_HAVE_SA_LEN - -Revision 1.29 2005/11/12 02:23:10 cheshire - mDNSUNP.c needs to deal with lame results from SIOCGIFNETMASK, SIOCGIFBRDADDR and SIOCGIFDSTADDR - -Revision 1.28 2005/10/31 22:09:45 cheshire -Buffer "char addr6[33]" was seven bytes too small - -Revision 1.27 2005/06/29 15:54:21 cheshire - mDNSResponder-107.1 does not work on FreeBSD -Refine last checkin so that it (hopefully) doesn't break get_ifi_info() for every other OS - -Revision 1.26 2005/04/08 21:43:59 ksekar - mDNSPosix (v98) retrieve interface list bug on AMD64 architecture -Submitted by Andrew de Quincey - -Revision 1.25 2005/04/08 21:37:57 ksekar - get_ifi_info doesn't return IPv6 interfaces on Linux - -Revision 1.24 2005/04/08 21:30:16 ksekar - Compiling problems with mDNSResponder-98 on Solaris/Sparc v9 -Patch submitted by Bernd Kuhls - -Revision 1.23 2004/12/01 04:25:05 cheshire - Darwin patches for Solaris and Suse -Provide daemon() for platforms that don't have it - -Revision 1.22 2004/11/30 22:37:01 cheshire -Update copyright dates and add "Mode: C; tab-width: 4" headers - -Revision 1.21 2004/11/08 22:13:59 rpantos -Create sockf6 lazily when v6 interface found. - -Revision 1.20 2004/10/16 00:17:01 cheshire - Replace IP TTL 255 check with local subnet source address check - -Revision 1.19 2004/07/20 01:47:36 rpantos -NOT_HAVE_SA_LEN applies to v6, too. And use more-portable s6_addr. - -Revision 1.18 2004/07/08 21:30:21 rpantos - -Revision 1.17 2004/06/25 00:26:27 rpantos -Changes to fix the Posix build on Solaris. - -Revision 1.16 2004/03/20 05:37:09 cheshire -Fix contributed by Terry Lambert & Alfred Perlstein: -Don't use uint8_t -- it requires stdint.h, which doesn't exist on FreeBSD 4.x - -Revision 1.15 2004/02/14 01:09:45 rpantos -Just use HAVE_IPV6 rather than defined(HAVE_IPV6). - -Revision 1.14 2003/12/11 18:53:40 cheshire -Fix compiler warning reported by Paul Guyot - -Revision 1.13 2003/12/08 20:47:02 rpantos -Add support for mDNSResponder on Linux. - -Revision 1.12 2003/09/02 20:47:13 cheshire -Fix signed/unsigned warning - -Revision 1.11 2003/08/12 19:56:26 cheshire -Update to APSL 2.0 - -Revision 1.10 2003/08/06 18:20:51 cheshire -Makefile cleanup - -Revision 1.9 2003/07/14 18:11:54 cheshire -Fix stricter compiler warnings - -Revision 1.8 2003/07/02 21:19:59 cheshire - Update copyright notices, etc., in source code comments - -Revision 1.7 2003/03/20 21:10:31 cheshire -Fixes done at IETF 56 to make mDNSProxyResponderPosix run on Solaris - -Revision 1.6 2003/03/13 03:46:21 cheshire -Fixes to make the code build on Linux - -Revision 1.5 2003/02/07 03:02:02 cheshire -Submitted by: Mitsutaka Watanabe -The code saying "index += 1;" was effectively making up random interface index values. -The right way to find the correct interface index is if_nametoindex(); - -Revision 1.4 2002/12/23 22:13:31 jgraessl - -Reviewed by: Stuart Cheshire -Initial IPv6 support for mDNSResponder. - -Revision 1.3 2002/09/21 20:44:53 zarzycki -Added APSL info - -Revision 1.2 2002/09/19 04:20:44 cheshire -Remove high-ascii characters that confuse some systems - -Revision 1.1 2002/09/17 06:24:34 cheshire -First checkin - -*/ + */ #include "mDNSUNP.h" @@ -179,9 +64,6 @@ #include #else #include -#ifdef HAVE_SOLARIS_ZONES -#include -#endif /* HAVE_SOLARIS_ZONES */ #endif /* !HAVE_SOLARIS */ #include // NOTE: netinet/in_var.h implicitly includes netinet6/in6_var.h for us @@ -373,19 +255,6 @@ if (strcmp(cmpifname, curifname) != 0) continue; -#ifdef HAVE_SOLARIS_ZONES - /* Check the zone associated with the address */ - lifrcopy = *lifr; - if (ioctl(sockfd, SIOCGLIFZONE, &lifrcopy) < 0) { - /* interface removed */ - if (errno == ENXIO) - continue; - return(NULL); - } - if (lifrcopy.lifr_zoneid != getzoneid()) - continue; -#endif - lifrcopy = *lifr; if (ioctl(sockfd, SIOCGLIFFLAGS, &lifrcopy) < 0) { /* interface removed */