]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
All stable/release versions of FreeBSD, pre- and post SO_ACCEPTFILTER
authorDirk-Willem van Gulik <dirkx@apache.org>
Mon, 16 Jul 2001 06:20:39 +0000 (06:20 +0000)
committerDirk-Willem van Gulik <dirkx@apache.org>
Mon, 16 Jul 2001 06:20:39 +0000 (06:20 +0000)
will give ENOPROTO. So ENOENT can go. Also it is sometimes hard to find
out what the kernel status is; this change in logging will give the
user at least a chance to figure out what is happening.

PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@89555 13f79535-47bb-0310-9956-ffa450edef68

src/main/http_main.c

index 07047e10e204fc951fb34c598a23f569acd33e40..4f9409ddd6f88ed90929a78cf9528473ce8c45f0 100644 (file)
@@ -3450,11 +3450,14 @@ static int make_sock(pool *p, const struct sockaddr_in *server)
        struct accept_filter_arg af = {
            ACCEPT_FILTER_NAME, ""
        };
-       if ((setsockopt(s, SOL_SOCKET, SO_ACCEPTFILTER, &af, sizeof(af)) < 0)
-            && (errno != ENOENT) && (errno != ENOPROTOOPT)) {
-           ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf,
-                        "make_sock: for %s, setsockopt: (SO_ACCEPTFILTER)",
-                        addr);
+       if (setsockopt(s, SOL_SOCKET, SO_ACCEPTFILTER, &af, sizeof(af)) < 0) {
+            if (errno == ENOPROTOOPT) {
+               ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, server_conf,
+                        "socket option SO_ACCEPTFILTER unkown on this machine. Continuing.");
+            } else {
+               ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_INFO, server_conf,
+                        "make_sock: for %s, setsockopt: (SO_ACCEPTFILTER)", addr);
+            }
        }
     }
 #endif