From a3a19758024b30b70f55ea9f3fd417cbaeaa4ab0 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Fri, 8 Aug 2008 13:26:43 +0000 Subject: [PATCH] disable untested SO_ACCEPTFILTER code --- NEWS | 1 + src/pooler.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index dc383e5..1ba729e 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ * Define _GNU_SOURCE as glibc is useless otherwise. * Let the libevent 1.1 pass link test so we can later report "1.3b+ needed" * Detect stale pidfile and remove it. + * Disable SO_ACCEPTFILTER code for BSDs which did not work. Thanks to Devrim GÜNDÜZ and Bjoern Metzdorf for problem reports and testing. diff --git a/src/pooler.c b/src/pooler.c index 30eec6a..39a1138 100644 --- a/src/pooler.c +++ b/src/pooler.c @@ -133,6 +133,7 @@ static void tune_accept(int sock, bool on) log_noise("%s TCP_DEFER_ACCEPT on %d", act, sock); res = setsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, &val, sizeof(val)); #else +#if 0 #ifdef SO_ACCEPTFILTER struct accept_filter_arg af, *afp = on ? &af : NULL; socklen_t af_len = on ? sizeof(af) : 0; @@ -141,6 +142,7 @@ static void tune_accept(int sock, bool on) log_noise("%s SO_ACCEPTFILTER on %d", act, sock); res = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, afp, af_len); #endif +#endif #endif if (res < 0) log_warning("tune_accept: %s TCP_DEFER_ACCEPT/SO_ACCEPTFILTER: %s", -- 2.39.5