From nobody@FreeBSD.org  Fri Dec 24 18:59:09 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 921CA10656FF
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Dec 2010 18:59:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 66C6A8FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Dec 2010 18:59:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBOIx97t041062
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Dec 2010 18:59:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBOIx9ZB041059;
	Fri, 24 Dec 2010 18:59:09 GMT
	(envelope-from nobody)
Message-Id: <201012241859.oBOIx9ZB041059@red.freebsd.org>
Date: Fri, 24 Dec 2010 18:59:09 GMT
From: Michael Scheidell <michael.scheidell@secnap.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: security/amavisd-new p5-IO-Socket-INET6 causes massive delays on non ipv6 systems
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153431
>Category:       ports
>Synopsis:       security/amavisd-new p5-IO-Socket-INET6 causes massive delays on non ipv6 systems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 24 19:00:17 UTC 2010
>Closed-Date:    Mon Jan 17 14:33:46 UTC 2011
>Last-Modified:  Mon Jan 17 14:40:10 UTC 2011
>Originator:     Michael Scheidell
>Release:        i386 7.3
>Organization:
SECNAP Network Security
>Environment:
>Description:
see:

<http://www.gossamer-threads.com/lists/spamassassin/users/157611>

if you include p5-IO-Socket-INET6 with a system that doesn't have ipv6 compiled in the kernel, you can cause 28 second delays PER DNS LOOKUP IN amavisd-new.

with mx, a, ptr, dkim, rbl and spf lookups, you can cause 3 mins delays per email.

(spamassassin -D < ../test-messages/sample-spam.txt took 6 second without INET6, 2mins 46 seconds with)


>How-To-Repeat:
portinstall p5-IO-Socket-INET6 on a non ipv6 system:
(comes installed as a requirement for amavisd-new)

>Fix:
Q to maintainer:  I can't see why p5-IO-Socket-INET6 is required on non ipv6 systems.  without it, everything seems fine.


this patch will fix it:

diff -bBru /tmp/ Makefile 
--- /tmp/Makefile	2010-09-21 03:56:39.000000000 -0400
+++ Makefile	2010-12-24 13:51:32.000000000 -0500
@@ -8,7 +8,7 @@
 
 PORTNAME=	amavisd-new
 PORTVERSION=	2.6.4
-PORTREVISION=	8
+PORTREVISION=	9
 PORTEPOCH=	1
 CATEGORIES=	security
 MASTER_SITES=	http://www.ijs.si/software/amavisd/ \
@@ -23,7 +23,6 @@
 		${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \
 		p5-Convert-UUlib>=1.08,1:${PORTSDIR}/converters/p5-Convert-UUlib \
 		${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
-		${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-Socket-INET6 \
 		p5-Net-Server>=0.93:${PORTSDIR}/net/p5-Net-Server \
 		p5-Mail-DKIM>=0.33:${PORTSDIR}/mail/p5-Mail-DKIM
 
@@ -224,6 +223,10 @@
 
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_IPV6)
+RUN_DEPENDS+= ${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-Socket-INET6
+.endif
+
 .if ${PERL_LEVEL} < 500903
 RUN_DEPENDS+=	p5-IO-Compress>=2.017:${PORTSDIR}/archivers/p5-IO-Compress
 .endif


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gabor 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Dec 24 19:00:29 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153431 
State-Changed-From-To: open->closed 
State-Changed-By: gabor 
State-Changed-When: Mon Jan 17 14:33:32 UTC 2011 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/153431: commit references a PR
Date: Mon, 17 Jan 2011 14:33:20 +0000 (UTC)

 gabor       2011-01-17 14:33:14 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/amavisd-new Makefile distinfo 
   Log:
   - Make IPv6 support optional because it causes a delay on systems that
     do not support it
   
   PR:             ports/153431
   Submitted by:   Michael Scheidell <michael.scheidell@secnap.com>
   Feature safe:   yes
   
   Revision  Changes    Path
   1.83      +8 -4      ports/security/amavisd-new/Makefile
   1.41      +0 -1      ports/security/amavisd-new/distinfo
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
