#
-# $Id: cf.data.pre,v 1.443 2007/06/27 04:26:12 hno Exp $
+# $Id: cf.data.pre,v 1.444 2007/07/09 19:54:13 wessels Exp $
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
# ----------------------------------------------------------
icap_access class_1 allow all
DOC_END
+NAME: accept_filter
+IFDEF: SO_ACCEPTFILTER
+TYPE: string
+DEFAULT: none
+LOC: Config.accept_filter
+DOC_START
+ The name of an accept(2) filter to install on Squid's
+ listen socket(s). This feature is perhaps specific to
+ FreeBSD and requires support in the kernel.
+
+ The 'httpready' filter delays delivering new connections
+ to Squid until a full HTTP request has been recieved.
+ See the accf_http(9) man page.
+
+EXAMPLE:
+accept_filter httpready
+DOC_END
+
EOF
/*
- * $Id: comm.cc,v 1.431 2007/05/26 06:38:04 wessels Exp $
+ * $Id: comm.cc,v 1.432 2007/07/09 19:54:13 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
return x;
}
+#ifdef SO_ACCEPTFILTER
+ if (Config.accept_filter) {
+ struct accept_filter_arg afa;
+ bzero(&afa, sizeof(afa));
+ debug(5, 0) ("Installing accept filter '%s' on FD %d\n",
+ Config.accept_filter, sock);
+ xstrncpy(afa.af_name, Config.accept_filter, sizeof(afa.af_name));
+ x = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
+ if (x < 0)
+ debug(5, 0) ("SO_ACCEPTFILTER '%s': %s\n", Config.accept_filter, xstrerror());
+ }
+#endif
+
return sock;
}
/*
- * $Id: structs.h,v 1.558 2007/05/29 13:31:41 amosjeffries Exp $
+ * $Id: structs.h,v 1.559 2007/07/09 19:54:13 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
ssl_client;
#endif
+
+#ifdef SO_ACCEPTFILTER
+ char *accept_filter;
+#endif
};
struct _SquidConfig2