From owner-freebsd-net@freebsd.org Mon Mar 26 00:40:07 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07178F57707 for ; Mon, 26 Mar 2018 00:40:07 +0000 (UTC) (envelope-from ddobrev85@gmail.com) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 789E681ACA for ; Mon, 26 Mar 2018 00:40:06 +0000 (UTC) (envelope-from ddobrev85@gmail.com) Received: by mail-wr0-x234.google.com with SMTP id 80so16075954wrb.2 for ; Sun, 25 Mar 2018 17:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:mime-version:to:from:subject:date:importance; bh=0wLnKgZp655EdtvbtnG2VvWh/F9HDDdpPWZ9wlPoiNc=; b=ANKUUNN6gaIP+cShlExfnB0FCsCiDonaUODIVGab9LXpTSbHcH05S/9SWvyPoIh/UX MozN1/n3gfFMYtoqoP//So2RdMygrSuWplVtQ1FNh0wYwWFmvIMMWaxd7YyA7pM5TMQq qSmgJrhenrCaluJ9fPyTkZY9xQTbSkGEqs04n06hETJwKXMSig574GWt3ff0wCh6GJdZ 8kbO9YfaNF0O77y77491DLY5aQk81lZxB9JXtYj9WI+j7XwiNclcuF47iGC7xYHYB+WV VLbXhHcSxVWLs6aKYuV9butkfrXIiufs4CXPLcKeyN+ZVOiyP4eCFIQykJ2ByCZ3fsny B3ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version:to:from:subject:date :importance; bh=0wLnKgZp655EdtvbtnG2VvWh/F9HDDdpPWZ9wlPoiNc=; b=K3kzFqFaKt5t124YkeihrNu2WFScgokOho/ed3rBvoNRwX2CdrX75ofIjVWDlpgw8W rqoXt2S1QlMN8uMFcQk40LD8Q4Y3m2g0/IE7RNlEIV8Pp5v1H4ZEgKOawD1xiZFPvZlc Vn6akmm+fyxya0zQYn2yizy8t7nxyQGHj/aOi7Z67mMLPPUyOO8KSKN1z99E5YK4FgOQ lQBGAeZynMQcYbGiHgPweGYiNgOvEyDT9jWxbt3LdE0CKesi8rfoUjNkaqEdlXckV00X o8R9ESQ9f0PgvwyCtNpkfEL8DjNyzLnJyzcKp+arTLMl1akOjdZk2TUQ9HQHk7/V7k2V LTUg== X-Gm-Message-State: AElRT7FYb7WrZZLXMPEQt+ILO5H8rNez75lbe/LiOhbI2HDFvGGm/Ih7 z2dhCwYloGNhgq7LvI/WGFz2vL2A X-Google-Smtp-Source: AG47ELt1H47r0yfsH+y9boBa5o7yaEoMG9jj9CvAEbSd+gdq3VOONWsCDjL0nKe8ra8GaN0bYRB6qA== X-Received: by 10.223.224.200 with SMTP id e8mr28621257wri.149.1522024804525; Sun, 25 Mar 2018 17:40:04 -0700 (PDT) Received: from ?IPv6:::ffff:192.168.254.130? ([87.227.223.203]) by smtp.gmail.com with ESMTPSA id k17sm12657026wrh.18.2018.03.25.17.40.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Mar 2018 17:40:03 -0700 (PDT) Message-ID: <5ab84163.91c8df0a.8c2a1.815a@mx.google.com> MIME-Version: 1.0 To: "freebsd-net@freebsd.org" From: Dobri Dobrev Subject: accf_http question Date: Mon, 26 Mar 2018 03:40:01 +0300 Importance: normal X-Priority: 3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2018 00:40:07 -0000 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?