You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rb...@covalent.net on 2001/07/13 17:03:46 UTC

Re: cvs commit: apache-1.3/src/main http_core.c http_main.c

On 13 Jul 2001 dirkx@apache.org wrote:

> dirkx       01/07/13 00:32:57
>
>   Modified:    src      CHANGES
>                src/include http_conf_globals.h
>                src/main http_core.c http_main.c
>   Log:
>   Scratched an itch; it was just to painfull to move
>   binaries around on FreeBSD - due to differences on
>   the platform apache was compiled on and it was actually
>   ran on. This adds AcceptFilter on/off to make live
>   easier. Corresponding commit in doc's coming up.

This seems like an extremely complex way to implement this.  The following
patch allows a binary compiled on FreeBSD with ACCEPTFILTERs to work on
FreeBSD's without them.  My own preference is to remove the new directive,
because we will need to support it in 2.0 as well.

Index: src/main/http_main.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.542
diff -u -d -b -w -u -r1.542 http_main.c
--- src/main/http_main.c        2001/06/22 12:43:54     1.542
+++ src/main/http_main.c        2001/06/22 21:22:44
@@ -3442,7 +3442,7 @@
            ACCEPT_FILTER_NAME, ""
        };
        if (setsockopt(s, SOL_SOCKET, SO_ACCEPTFILTER, &af, sizeof(af)) <
0
-           && errno != ENOENT) {
+           && errno != ENOENT && errno != ENOPROTOOPT) {
            ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf,
                         "make_sock: for %s, setsockopt: (SO_ACCEPTFILTER)",
                         addr);



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


Re: cvs commit: apache-1.3/src/main http_core.c http_main.c

Posted by Dirk-Willem van Gulik <di...@covalent.net>.

On Fri, 13 Jul 2001 rbb@covalent.net wrote:

> This seems like an extremely complex way to implement this.  The following
> patch allows a binary compiled on FreeBSD with ACCEPTFILTERs to work on
> FreeBSD's without them.  My own preference is to remove the new directive,
> because we will need to support it in 2.0 as well.

> +           && errno != ENOENT && errno != ENOPROTOOPT) {

This is *also* a good improvement; but as Dean said (and I found to my
chagarin) on some machine; though they do support SO_ACCEPTFILTER you
want to be able to switch it off has it wedges with certain kernels.

Hence the need to ALSO switch it off.

Dw.


Re: cvs commit: apache-1.3/src/main http_core.c http_main.c

Posted by Dirk-Willem van Gulik <di...@covalent.net>.

On Fri, 13 Jul 2001 rbb@covalent.net wrote:

> This seems like an extremely complex way to implement this.  The following
> patch allows a binary compiled on FreeBSD with ACCEPTFILTERs to work on
> FreeBSD's without them.  My own preference is to remove the new directive,
> because we will need to support it in 2.0 as well.

> +           && errno != ENOENT && errno != ENOPROTOOPT) {

This is *also* a good improvement; but as Dean said (and I found to my
chagarin) on some machine; though they do support SO_ACCEPTFILTER you
want to be able to switch it off has it wedges with certain kernels.

Hence the need to ALSO switch it off.

Dw.