Date: Sat, 11 Jun 2005 02:12:16 +0400 (MSD) From: Igor Sysoev <is@rambler-co.ru> To: freebsd-net@freebsd.org Cc: Alfred Perlstein <alfred@freebsd.org> Subject: setsockopt() can not remove the accept filter Message-ID: <20050611020140.R27835@is.park.rambler.ru>
next in thread | raw e-mail | index | archive | help
Hi,
man setsockopt(2) states that "passing in an optval of NULL will remove
the filter", however, setsockopt() always return EINVAL in this case,
because do_setopt_accept_filter() removes the filter if sopt == NULL, but
not if sopt->val == NULL. The fix is easy:
- if (sopt == NULL) {
+ if (sopt == NULL || sopt->val == NULL) {
By the way, is it easy to add timeout for dataready and httpready filters ?
Now the stale connections may live for long time.
Igor Sysoev
http://sysoev.ru/en/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050611020140.R27835>
