httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <>
Subject BSD Accept filters
Date Tue, 10 Jul 2001 07:03:06 GMT

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 ?


View raw message