Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2018 03:40:01 +0300
From:      Dobri Dobrev <ddobrev85@gmail.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   accf_http question
Message-ID:  <5ab84163.91c8df0a.8c2a1.815a@mx.google.com>

next in thread | raw e-mail | index | archive | help

In my application I set SO_RECVTIMEO to 1.5 seconds, then enable SO_ACCEPTF=
ILTER (httpready).
accf_http module is loaded in the kernel.

The problem is that if I connect to the socket but don=E2=80=99t send any d=
ata, the connection remains open indefinitely. The application of course wo=
n=E2=80=99t see a connection since the accept filter don=E2=80=99t see a co=
mplete http request.

Why is this the case? Why doesn=E2=80=99t SO_RECVTIMEO affect the socket? H=
ow to close such connections early?

Also, the documentation says: =E2=80=9CThe optional argument af_arg can be
     passed to the accept filter specified by af_name to provide additional
     configuration options at attach time.=E2=80=9D

I checked the code of accf_http.c, but from what I see =E2=80=93 the =E2=80=
=9Carg=E2=80=9D value is not used anywhere, nor is there any indication as =
to what that value might be.

Does anyone have any ideas?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ab84163.91c8df0a.8c2a1.815a>