Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 13:20:56 +0200
From:      Martin Beran <mb@tns.cz>
To:        freebsd-stable@freebsd.org
Subject:   Re: Kernel panic with PF
Message-ID:  <20060724112056.GA8744@mb.tns.cz>
In-Reply-To: <20060721161522.GA10111@mb.tns.cz>
References:  <20060721010559.GB23227@insomnia.benzedrine.cx> <1153410809.1126.66.camel@genius.i.cz> <200607210205.51614.max@love2party.net> <1153410809.1126.66.camel@genius.i.cz> <44BFA8F9.8010403@jellydonut.org> <1153433881.1173.3.camel@genius.i.cz> <1153410809.1126.66.camel@genius.i.cz> <44BFA8F9.8010403@jellydonut.org> <1153410809.1126.66.camel@genius.i.cz> <20060721161522.GA10111@mb.tns.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 21, 2006 at 02:15:33PM +0000, Martin Beran wrote:

> I think this is not the case. The proxy uses either DIOCXBEGIN + DIOCBEGINADDRS
> + DIOCADDADDR + DIOCADDRULE + DIOCXCOMMIT or
> DIOCCHANGERULE(PF_CHANGE_GET_TICKET) + DIOCBEGINADDRS + DIOCADDADDR
> + DIOCCHANGERULE(PF_CHANGE_ADD_TAIL). The first method is used in the first
> call to create the ruleset. In the subsequent call, the second method is used
> to modify the ruleset.

I did an experiment - repeated adding and deleting rules in two processes, as
fast as possible. I expected EBUSY from time to time, but I also received
EINVAL indeterministically. It seems to me that when the PF ioctl() is called
simultaneously by two processes, it sometimes retuns EINVAL, although it sould
be possible to either complete the operation (parameters are correct), or
return EBUSY.

-- 
Martin Beran

Senior Developer

Trusted Network Solutions, a.s.
mobil: +420 603 820 932
[ www.tns.cz ]



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