Commit 5604bdaa authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Add a hint in the accept_filter documentation

Trying to understand why I was seeing setsockopt fail on FreeBSD VTEST
boxes and why it failed with an undocumented ENOENT I finally realized
that I needed to kldload accf_http beforehand.

The ENOENT errno was probably a result of accept_filter code not finding
a kernel module for "httpready".
parent 28956a65
...@@ -48,7 +48,8 @@ PARAM( ...@@ -48,7 +48,8 @@ PARAM(
/* units */ "bool", /* units */ "bool",
/* flags */ XYZZY, /* flags */ XYZZY,
/* s-text */ /* s-text */
"Enable kernel accept-filters.", "Enable kernel accept-filters. This may require a kernel module to "
"be loaded to have an effect when enabled.",
/* l-text */ NULL, /* l-text */ NULL,
/* func */ NULL /* func */ NULL
) )
......
...@@ -153,7 +153,6 @@ VTCP_filter_http(int sock) ...@@ -153,7 +153,6 @@ VTCP_filter_http(int sock)
memset(&afa, 0, sizeof afa); memset(&afa, 0, sizeof afa);
bprintf(afa.af_name, "%s", "httpready"); bprintf(afa.af_name, "%s", "httpready");
errno = 0;
retval = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, retval = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
&afa, sizeof afa); &afa, sizeof afa);
return (retval); return (retval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment