Balance - Port

Jeremy Chadwick koitsu at FreeBSD.org
Sun Sep 14 15:26:06 UTC 2008


On Sun, Sep 14, 2008 at 06:12:08PM +0300, Okalany Daniel wrote:
> On Fri, Sep 12, 2008 at 5:03 PM, Jeremy Chadwick <koitsu at freebsd.org> wrote:
> 
> > 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 at down.one2net.co.ug:
> > /usr/obj/usr/src/sys/IPFWKERNEL
> > > i386
> > >
> > > [root at 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
> >
> 
> Thanks for the quick response, but that hasnt solved the issue, it stays the
> same.

Interesting, since that resolved said problem on my IPv4-only machine,
but that's a RELENG_7 box.  I wonder how the -U is getting overridden.

-- 
| 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 |



More information about the freebsd-ports mailing list