accf_http question
Dobri Dobrev
ddobrev85 at gmail.com
Mon Mar 26 00:40:07 UTC 2018
In my application I set SO_RECVTIMEO to 1.5 seconds, then enable SO_ACCEPTFILTER (httpready).
accf_http module is loaded in the kernel.
The problem is that if I connect to the socket but don’t send any data, the connection remains open indefinitely. The application of course won’t see a connection since the accept filter don’t see a complete http request.
Why is this the case? Why doesn’t SO_RECVTIMEO affect the socket? How to close such connections early?
Also, the documentation says: “The optional argument af_arg can be
passed to the accept filter specified by af_name to provide additional
configuration options at attach time.”
I checked the code of accf_http.c, but from what I see – the “arg” value is not used anywhere, nor is there any indication as to what that value might be.
Does anyone have any ideas?
More information about the freebsd-net
mailing list