[master] 5604bdaa6 Add a hint in the accept_filter documentation
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Dec 31 10:05:10 UTC 2019
commit 5604bdaa6730d4372a7308746ef4b5cf9ca4d073
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Dec 31 09:14:26 2019 +0100
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".
diff --git a/include/tbl/params.h b/include/tbl/params.h
index 272829a10..61fa9a03a 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -48,7 +48,8 @@ PARAM(
/* units */ "bool",
/* flags */ XYZZY,
/* 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,
/* func */ NULL
)
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index a7ed8f4f9..763db1ee6 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -153,7 +153,6 @@ VTCP_filter_http(int sock)
memset(&afa, 0, sizeof afa);
bprintf(afa.af_name, "%s", "httpready");
- errno = 0;
retval = setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER,
&afa, sizeof afa);
return (retval);
More information about the varnish-commit
mailing list