From owner-freebsd-ports@FreeBSD.ORG Fri Sep 12 14:03:29 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D0AD1065672 for ; Fri, 12 Sep 2008 14:03:29 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA02.westchester.pa.mail.comcast.net (qmta02.westchester.pa.mail.comcast.net [76.96.62.24]) by mx1.freebsd.org (Postfix) with ESMTP id 14AD98FC25 for ; Fri, 12 Sep 2008 14:03:27 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA11.westchester.pa.mail.comcast.net ([76.96.62.36]) by QMTA02.westchester.pa.mail.comcast.net with comcast id DmlN1a00D0mv7h052q3RnR; Fri, 12 Sep 2008 14:03:25 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA11.westchester.pa.mail.comcast.net with comcast id Dq3S1a00D4v8bD73Xq3SFP; Fri, 12 Sep 2008 14:03:27 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=XZIOeDb4mZ_lbaO3CVoA:9 a=I0NrNclUdnJ2h_fQExwA:7 a=Kz5VNd0wXt3PvenQbcG0Nu4q3-IA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id A858717B81A; Fri, 12 Sep 2008 07:03:25 -0700 (PDT) Date: Fri, 12 Sep 2008 07:03:25 -0700 From: Jeremy Chadwick To: Okalany Daniel Message-ID: <20080912140325.GA57733@icarus.home.lan> References: <28f643d90809120600rd8998bcya2999f32cefe7a19@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28f643d90809120600rd8998bcya2999f32cefe7a19@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-ports@freebsd.org Subject: Re: Balance - Port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 14:03:29 -0000 On Fri, Sep 12, 2008 at 04:00:06PM +0300, Okalany Daniel wrote: > Im on freebsd current with ports current. > FreeBSD down.one2net.co.ug 8.0-CURRENT FreeBSD 8.0-CURRENT #7: Wed Sep 10 > 19:31:10 EAT 2008 root@down.one2net.co.ug:/usr/obj/usr/src/sys/IPFWKERNEL > i386 > > [root@down /usr/home/oka]# /usr/local/etc/rc.d/balance start > setsockopt(IPV6_V6ONLY=0): Invalid argument > > Is this a problem with balancer or my options? It appears you've removed IPv6 support from your kernel, which is fine. The bug in with the IPv6 detection method used by balancer. The logic in balancer is "if IPV6_V6ONLY is defined, call setsockopt() with IPV6_V6ONLY". The definition is pulled in from one of many #include files in /usr/include. balancer assumes that if IPV6_V6ONLY is defined, that it should make the setsockopt() call. This won't work for systems with IPv6 removed from the kernel -- because the system #include files still define IPV6_V6ONLY as an available bit. Can you apply the following hackfix against ports/net/balancer/Makefile and tell me if it works for you? Please note you'll need to build the port either with "make WITHOUT_IPV6=true" or place WITHOUT_IPV6=true in /etc/make.conf. --- Makefile.orig 2008-07-09 00:15:46.000000000 -0700 +++ Makefile 2008-09-12 07:00:44.000000000 -0700 @@ -20,6 +20,10 @@ MAN1= balance.1 +.if defined(WITHOUT_IPV6) +CFLAGS+= -UIPV6_V6ONLY +.endif + pre-build: @${REINPLACE_CMD} -e 's|^CFLAGS|CFLAGS?|' \ -e 's|^CC|CC?|' ${WRKSRC}/Makefile -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |