Re: refactoring of pf_find_or_create_ruleset()

2017-09-05 Thread Alexandr Nedvedicky
Hello, On Mon, Sep 04, 2017 at 09:51:29PM +0200, Alexander Bluhm wrote: > On Mon, Sep 04, 2017 at 10:29:01AM +0200, Alexandr Nedvedicky wrote: > > anyway below is the patch, which Hrvoje was testing and it worked for > > him. > > I'd like to get some OK to proceed to commit. > > I think i

Re: refactoring of pf_find_or_create_ruleset()

2017-09-04 Thread Alexander Bluhm
On Mon, Sep 04, 2017 at 10:29:01AM +0200, Alexandr Nedvedicky wrote: > anyway below is the patch, which Hrvoje was testing and it worked for him. > I'd like to get some OK to proceed to commit. I think it is correct. OK bluhm@ > + if (parent != NULL) { > + /* > +

Re: refactoring of pf_find_or_create_ruleset()

2017-09-04 Thread Alexandr Nedvedicky
Hello, > with this patch i can't trigger panic with or without WITH_PF_LOCK if > that's matter for some reason. anyway below is the patch, which Hrvoje was testing and it worked for him. I'd like to get some OK to proceed to commit. > thank you sasha for great work on MP pf :) I'm v

Re: refactoring of pf_find_or_create_ruleset()

2017-09-02 Thread Hrvoje Popovski
On 1.9.2017. 22:57, Alexandr Nedvedicky wrote: > as you can see the kernel sets ruleset.anchor to NULL (see pfattach() and then > do also a 'grep -n kludge pf_ioctl.c'), while userland links it to > pf_main_anchor. > > I've remember to changing 'parent != NULL' to 'parent != &pf_main_anchor' in >

Re: refactoring of pf_find_or_create_ruleset()

2017-09-01 Thread Alexandr Nedvedicky
Hello Hrvoje, > Hi, > > with this diff i'm getting this panic: > > # pfctl -nvf /etc/pf.conf > set limit states 100 > set skip on { lo em0 } > block return all > pass all flags S/SA > anchor "test1" on ix1 all { > pass all flags S/SA > } > > > # pfctl -f /etc/pf.conf > uvm_fault(0xff

refactoring of pf_find_or_create_ruleset()

2017-08-31 Thread Alexandr Nedvedicky
Hello, long time ago mpi@ asked, what I would improve in PF to make the code ready for SMP massage. Everybody knows PF is perfect, right? So it took me a while to find a code for facelift. Patch below breaks pf_find_or_create_ruleset() spaghetti to more chunks: pf_find_or_create_ruleset()