Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jun 2005 16:05:06 +0400 (MSD)
From:      Maxim Konovalov <maxim@FreeBSD.org>
To:        Igor Sysoev <is@rambler-co.ru>
Cc:        freebsd-net@FreeBSD.org, Alfred Perlstein <alfred@FreeBSD.org>
Subject:   Re: setsockopt() can not remove the accept filter
Message-ID:  <20050611160250.K5756@mp2.macomnet.net>
In-Reply-To: <20050611020140.R27835@is.park.rambler.ru>
References:  <20050611020140.R27835@is.park.rambler.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Igor,

On Sat, 11 Jun 2005, 02:12+0400, Igor Sysoev wrote:

> 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) {

I committed fixes for this and related bug and will MFC them in two
weeks.  Thanks!

-- 
Maxim Konovalov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050611160250.K5756>