httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: BSD Accept filters
Date Tue, 10 Jul 2001 15:03:15 GMT
On Tue, 10 Jul 2001, Dirk-Willem van Gulik wrote:

>
> I am getting more than a bit anoyed by the BSD accept filters; when you
> have them in a binary; they are always on. And if the setsockopt()
> fails things bomb wiht an exit(1).
>
> Which is a bit of a pain if you move them between machines and/or have
> kernels which (sometimes) do not have them plugged in.
>
> What is the best strategy:
>
> 0	Change the 'exit' when the sockopt fails for SO_ACCEPTFILTER
> 	to a warning;.
> 1	Leave as is; but provide an AcceptFilter on/off directive
> 	to switch it off - if SO_ACCPETFILTER is defined.
> 2.	Have AcceptFitler on/off on all platforms; it is just a
> 	NOP unless SO_ACCEPTFILTER is defined. THis makes your
> 	config file more portable (as an <if core> module selector
> 	is not going to work).
> 3.	As '2' - but give a warning if someone sets it to 'on'
> 	on a platform which does not support it.
>
> I think 0 or 2 is best. Opinions before I commit something ?

I have a patch that fixes this already.  I didn't commit it to 1.3,
because I was under the impression that we weren't going to release
another 1.3 tree.  I didn't commit to 2.0, because I forgot.  :-(  The
problem is that we are checking for the wrong errno when the setsockopt
fails.  The errno we check for should never be returned by setsockopt.  If
we change the errno to the correct one (I have to look at my patch),
everything just works correctly.

Ryan

_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------


Mime
View raw message