From nobody@FreeBSD.org  Sat Oct  5 20:47:02 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id D7D14A02
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  5 Oct 2013 20:47:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id C48E92513
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  5 Oct 2013 20:47:02 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r95Kl2V2094052
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 5 Oct 2013 20:47:02 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r95Kl29V094051;
	Sat, 5 Oct 2013 20:47:02 GMT
	(envelope-from nobody)
Message-Id: <201310052047.r95Kl29V094051@oldred.freebsd.org>
Date: Sat, 5 Oct 2013 20:47:02 GMT
From: Nuno Subtil <subtil@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mDNSResponder crashes on IPV6-capable network
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182718
>Category:       ports
>Synopsis:       net/mDNSResponder crashes on IPV6-capable network
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sunpoet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 05 20:50:01 UTC 2013
>Closed-Date:    Sat Oct 26 17:50:44 UTC 2013
>Last-Modified:  Sat Oct 26 17:50:44 UTC 2013
>Originator:     Nuno Subtil
>Release:        9.2-RELEASE
>Organization:
N/A
>Environment:
FreeBSD ponyo 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r+05c3e78: Fri Oct  4 18:22:18 PDT 2013     root@ponyo:/usr/obj/usr/src/sys/HOWL  amd64
>Description:
mDNSResponder will crash occasionally when used on a network with IPV6-capable Mac OS X hosts:

Assertion failed: (0), function recvfrom_flags, file mDNSUNP.c, line 665.

This seems to be caused by a wrong/stale set of #defines in mDNSUNP.h
>How-To-Repeat:
Run 'mDNSResponderPosix -v 2'
>Fix:


Patch attached with submission follows:

--- ./mDNSPosix/mDNSUNP.h.orig	2011-12-01 16:39:45.000000000 -0800
+++ ./mDNSPosix/mDNSUNP.h	2013-10-05 13:18:15.000000000 -0700
@@ -31,10 +31,15 @@
 // The following are the supported non-linux posix OSes -
 // netbsd, freebsd and openbsd.
 #if HAVE_IPV6
+#if defined(__FreeBSD__)
+#define IPV6_2292_PKTINFO  IPV6_PKTINFO
+#define IPV6_2292_HOPLIMIT IPV6_HOPLIMIT
+#else
 #define IPV6_2292_PKTINFO  19
 #define IPV6_2292_HOPLIMIT 20
 #endif
 #endif
+#endif
 
 #ifdef  __cplusplus
 extern "C" {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sunpoet 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Oct 5 20:56:36 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182718 

From: Matthieu Volat <mazhe@alkumuna.eu>
To: bug-followup@FreeBSD.org, subtil@gmail.com
Cc:  
Subject: Re: ports/182718: net/mDNSResponder crashes on IPV6-capable network
Date: Mon, 21 Oct 2013 07:49:11 +0200

 --Sig_/Lk7cT8kROkEIw05PNu=f8ES
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 I confirm the problem and solution.
 
 I also submitted a PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/1=
 82199) that was wrongly renamed and assigned.
 
 Can this patch be applied, please?
 
 --=20
 Matthieu Volat <mazhe@alkumuna.eu>
 
 --Sig_/Lk7cT8kROkEIw05PNu=f8ES
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Disposition: attachment; filename=signature.asc
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (FreeBSD)
 
 iEYEARECAAYFAlJkwF0ACgkQ+ENDeYKZi34p/QCgzKryGTCVgYrjtvnuiJ9xvLAV
 KqgAoJB6woYGBsU6630nn5xfD9sleGBS
 =hHg5
 -----END PGP SIGNATURE-----
 
 --Sig_/Lk7cT8kROkEIw05PNu=f8ES--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182718: commit references a PR
Date: Sat, 26 Oct 2013 17:47:34 +0000 (UTC)

 Author: sunpoet
 Date: Sat Oct 26 17:47:25 2013
 New Revision: 331724
 URL: http://svnweb.freebsd.org/changeset/ports/331724
 
 Log:
   - Install dns-sd.1 manpage
   - Support STAGEDIR
   - Fix crashes on IPv6 network [1][2][3]
   - Bump PORTREVISION for package change
   
   PR:		ports/182199 [1], ports/182718 [2], ports/182815 [3]
   Submitted by:	Matthieu Volat <mazhe@alkumuna.eu> [1],
   		Nuno Subtil <subtil@gmail.com> [2],
   		Anton Fuller <antonfuller@bv.mintemail.com> [3]
 
 Added:
   head/net/mDNSResponder/pkg-plist   (contents, props changed)
 Modified:
   head/net/mDNSResponder/Makefile
   head/net/mDNSResponder/files/patch-mDNSPosix-Makefile
 
 Modified: head/net/mDNSResponder/Makefile
 ==============================================================================
 --- head/net/mDNSResponder/Makefile	Sat Oct 26 17:08:47 2013	(r331723)
 +++ head/net/mDNSResponder/Makefile	Sat Oct 26 17:47:25 2013	(r331724)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	mDNSResponder
  PORTVERSION=	379.38.1
 +PORTREVISION=	1
  CATEGORIES=	net dns
  MASTER_SITES=	http://opensource.apple.com/tarballs/${PORTNAME}/
  
 @@ -16,32 +17,29 @@ CONFLICTS=	avahi-libdns-[0-9]*
  
  BUILD_WRKSRC=	${WRKSRC}/mDNSPosix
  INSTALL_WRKSRC=	${WRKSRC}/mDNSPosix
 -MAKE_ARGS=	os=freebsd LOCALBASE=${PREFIX} MANPATH=${MANPREFIX}/man
 +MAKE_ARGS=	LOCALBASE=${PREFIX} MANPATH=${MANPREFIX}/man os=freebsd
  USES=		bison gmake
  USE_LDCONFIG=	yes
  USE_RC_SUBR=	mdnsd
  
 -EXTRA_BIN=	bin/mDNSClientPosix bin/mDNSIdentify bin/mDNSNetMonitor \
 -		bin/mDNSProxyResponderPosix bin/mDNSResponderPosix
 +EXTRA_BIN=	mDNSClientPosix mDNSIdentify mDNSNetMonitor mDNSProxyResponderPosix mDNSResponderPosix
 +EXTRA_MAN1=	dns-sd.1
  EXTRA_MAN8=	dnsextd.8 mDNSResponderPosix.8
 -EXTRA_SBIN=	sbin/dnsextd
 -MAN8=		mdnsd.8 ${EXTRA_MAN8}
 -PLIST_FILES=	bin/dns-sd ${EXTRA_BIN} \
 -		include/dns_sd.h \
 -		lib/libdns_sd.so lib/libdns_sd.so.1 \
 -		sbin/mdnsd ${EXTRA_SBIN}
 +EXTRA_SBIN=	dnsextd
  
 -NO_STAGE=	yes
  post-patch:
  	@${REINPLACE_CMD} -e '/	cc / s|cc|$${CC}|' ${WRKSRC}/Clients/Makefile
  	@${REINPLACE_CMD} -e 's|-lpthread|-pthread|g; s|mDNSResponder.8|mDNSResponderPosix.8|g' ${WRKSRC}/mDNSPosix/Makefile
 +	@${REINPLACE_CMD} -e 's|\(#define IPV6_2292_PKTINFO \).*|\1IPV6_PKTINFO|; s|\(#define IPV6_2292_HOPLIMIT \).*|\1IPV6_HOPLIMIT|' ${WRKSRC}/mDNSPosix/mDNSUNP.h
  	@${MV} ${WRKSRC}/mDNSShared/mDNSResponder.8 ${WRKSRC}/mDNSShared/mDNSResponderPosix.8
  
 +post-build:
 +	@${STRIP_CMD} ${WRKSRC}/Clients/build/dns-sd ${WRKSRC}/mDNSPosix/build/prod/mdnsd ${WRKSRC}/mDNSPosix/build/prod/libdns_sd.so
 +
  post-install:
 -	cd ${WRKSRC}/mDNSPosix/build/prod/ && \
 -		${INSTALL_PROGRAM} ${EXTRA_BIN:T} ${PREFIX}/bin/ && \
 -		${INSTALL_PROGRAM} ${EXTRA_SBIN:T} ${PREFIX}/sbin/
 -	cd ${WRKSRC}/mDNSShared/ && \
 -		${INSTALL_MAN} ${EXTRA_MAN8} ${MAN8PREFIX}/man/man8/
 +	cd ${WRKSRC}/mDNSPosix/build/prod/ && ${INSTALL_PROGRAM} ${EXTRA_BIN} ${STAGEDIR}${PREFIX}/bin/
 +	cd ${WRKSRC}/mDNSShared/ && ${INSTALL_MAN} ${EXTRA_MAN1} ${STAGEDIR}${PREFIX}/man/man1/
 +	cd ${WRKSRC}/mDNSShared/ && ${INSTALL_MAN} ${EXTRA_MAN8} ${STAGEDIR}${PREFIX}/man/man8/
 +	cd ${WRKSRC}/mDNSPosix/build/prod/ && ${INSTALL_PROGRAM} ${EXTRA_SBIN} ${STAGEDIR}${PREFIX}/sbin/
  
  .include <bsd.port.mk>
 
 Modified: head/net/mDNSResponder/files/patch-mDNSPosix-Makefile
 ==============================================================================
 --- head/net/mDNSResponder/files/patch-mDNSPosix-Makefile	Sat Oct 26 17:08:47 2013	(r331723)
 +++ head/net/mDNSResponder/files/patch-mDNSPosix-Makefile	Sat Oct 26 17:47:25 2013	(r331724)
 @@ -1,5 +1,5 @@
  --- mDNSPosix/Makefile.orig	2011-11-03 08:23:39.000000000 +0800
 -+++ mDNSPosix/Makefile	2013-08-16 22:56:35.265791824 +0800
 ++++ mDNSPosix/Makefile	2013-10-13 02:29:12.791431406 +0800
  @@ -54,7 +54,7 @@
   SHAREDDIR ?= ../mDNSShared
   JDK = /usr/jdk
 @@ -40,6 +40,94 @@
   	@$(MAKE) -C ../Clients
   
   # nss_mdns target builds the Name Service Switch module
 +@@ -276,43 +276,43 @@
 + #############################################################################
 + 
 + # The Install targets place built stuff in their proper places
 +-InstalledDaemon: $(INSTBASE)/sbin/mdnsd
 ++InstalledDaemon: $(DESTDIR)$(INSTBASE)/sbin/mdnsd
 + 	@echo $+ " installed"
 + 
 +-InstalledLib: $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(INSTBASE)/include/dns_sd.h
 ++InstalledLib: $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/include/dns_sd.h
 + 	@echo $+ " installed"
 + 
 +-InstalledStartup: $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME)
 ++InstalledStartup: $(DESTDIR)$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME)
 + 	@echo $+ " installed"
 + 
 +-InstalledManPages: $(MANPATH)/man8/mdnsd.8
 ++InstalledManPages: $(DESTDIR)$(MANPATH)/man8/mdnsd.8
 + 	@echo $+ " installed"
 + 
 +-InstalledClients: $(INSTBASE)/bin/dns-sd
 ++InstalledClients: $(DESTDIR)$(INSTBASE)/bin/dns-sd
 + 	@echo $+ " installed"
 + 
 +-InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8
 ++InstalledNSS: $(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(DESTDIR)$(MANPATH)/man5/nss_mdns.conf.5 $(DESTDIR)$(MANPATH)/man8/libnss_mdns.8
 + 	@echo $+ " installed"
 + 
 + # Note: If daemon already installed, we make sure it's stopped before overwriting it
 +-$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd
 ++$(DESTDIR)$(INSTBASE)/sbin/mdnsd: $(BUILDDIR)/mdnsd
 + 	@if test -x $@; then $(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME) stop; fi
 + 	$(CP) $< $@
 + 
 +-$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
 ++$(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX).$(LIBVERS): $(BUILDDIR)/libdns_sd.$(LDSUFFIX)
 + 	$(CP) $< $@
 +-	$(LN) $@ $(INSTBASE)/lib/libdns_sd.$(LDSUFFIX)
 ++	$(LN) libdns_sd.$(LDSUFFIX).$(LIBVERS) $(DESTDIR)$(INSTBASE)/lib/libdns_sd.$(LDSUFFIX)
 + ifdef LDCONFIG
 +     # -m means 'merge into existing database', -R means 'rescan directories'
 + 	$(LDCONFIG) -mR
 + endif
 + 
 +-$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h
 ++$(DESTDIR)$(INSTBASE)/include/dns_sd.h: $(SHAREDDIR)/dns_sd.h
 + 	$(CP) $< $@
 + 
 + # We make this target dependent on $(INSTBASE)/sbin/mdnsd because we need to ensure
 + # that the daemon is installed *before* we try to execute the command to start it.
 +-$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) $(INSTBASE)/sbin/mdnsd
 ++$(STARTUPSCRIPTDIR)/$(STARTUPSCRIPTNAME): mdnsd.sh $(STARTUPSCRIPTDIR) $(DESTDIR)$(INSTBASE)/sbin/mdnsd
 + 	$(CP) $< $@
 + 	chmod ugo+x $@
 + 	$@ start
 +@@ -329,26 +329,26 @@
 + endif
 + endif
 + 
 +-$(MANPATH)/man5/%.5: %.5
 ++$(DESTDIR)$(MANPATH)/man5/%.5: %.5
 + 	cp $< $@
 + 	chmod 444 $@
 + 
 +-$(MANPATH)/man8/%.8: %.8
 ++$(DESTDIR)$(MANPATH)/man8/%.8: %.8
 + 	cp $< $@
 + 	chmod 444 $@
 + 
 +-$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8
 ++$(DESTDIR)$(MANPATH)/man8/mdnsd.8: $(SHAREDDIR)/mDNSResponder.8
 + 	cp $< $@
 + 	chmod 444 $@
 + 
 +-$(INSTBASE)/bin/dns-sd: ../Clients/build/dns-sd
 ++$(DESTDIR)$(INSTBASE)/bin/dns-sd: ../Clients/build/dns-sd
 + 	$(CP) $< $@
 + 
 +-$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
 ++$(DESTDIR)$(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE)
 + 	$(LN) $< $@
 + 	ldconfig
 + 
 +-$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
 ++$(DESTDIR)$(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE)
 + 	$(CP) $< $@
 + 	chmod 444 $@
 + 
  @@ -490,6 +490,8 @@
   $(BUILDDIR)/dnsextd:                 $(DNSEXTDOBJ) $(OBJDIR)/dnsextd.c.threadsafe.o
   	$(CC) $+ -o $@ $(LINKOPTS) $(LINKOPTS_PTHREAD)
 
 Added: head/net/mDNSResponder/pkg-plist
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/net/mDNSResponder/pkg-plist	Sat Oct 26 17:47:25 2013	(r331724)
 @@ -0,0 +1,15 @@
 +bin/dns-sd
 +bin/mDNSClientPosix
 +bin/mDNSIdentify
 +bin/mDNSNetMonitor
 +bin/mDNSProxyResponderPosix
 +bin/mDNSResponderPosix
 +include/dns_sd.h
 +lib/libdns_sd.so
 +lib/libdns_sd.so.1
 +man/man1/dns-sd.1.gz
 +man/man8/dnsextd.8.gz
 +man/man8/mDNSResponderPosix.8.gz
 +man/man8/mdnsd.8.gz
 +sbin/dnsextd
 +sbin/mdnsd
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: sunpoet 
State-Changed-When: Sat Oct 26 17:50:44 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182718 
>Unformatted:
