Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-06-03 Thread Mike Belopuhov
On Thu, May 28, 2015 at 23:46 +0200, Alexandr Nedvedicky wrote: /snip But we'll drop this reference in pf_src_tree_remove_state, then how will sns[PF_SN_NAT] and sns[PF_SN_ROUTE] be different? I think I should take PF class again ;-) I've just realized there is a test in

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-28 Thread Alexandr Nedvedicky
/snip But we'll drop this reference in pf_src_tree_remove_state, then how will sns[PF_SN_NAT] and sns[PF_SN_ROUTE] be different? I think I should take PF class again ;-) I've just realized there is a test in pf_remove_src_node(): 572 if (sn-states 0 || sn-expire

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-28 Thread Mike Belopuhov
On Thu, May 28, 2015 at 01:17 +0200, Alexandr Nedvedicky wrote: Hello, On Wed, May 27, 2015 at 07:44:15PM +0200, Mike Belopuhov wrote: On Wed, May 27, 2015 at 10:39 +0200, Alexandr Nedvedicky wrote: Hello, - if (pf_state_insert(BOUND_IFACE(r, pd-kif), skw, sks, s)) {

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-28 Thread Alexandr Nedvedicky
On Thu, May 28, 2015 at 11:43:02AM +0200, Mike Belopuhov wrote: On Thu, May 28, 2015 at 01:17 +0200, Alexandr Nedvedicky wrote: Hello, On Wed, May 27, 2015 at 07:44:15PM +0200, Mike Belopuhov wrote: On Wed, May 27, 2015 at 10:39 +0200, Alexandr Nedvedicky wrote: Hello,

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-28 Thread Mike Belopuhov
On Thu, May 28, 2015 at 13:34 +0200, Alexandr Nedvedicky wrote: On Thu, May 28, 2015 at 11:43:02AM +0200, Mike Belopuhov wrote: On Thu, May 28, 2015 at 01:17 +0200, Alexandr Nedvedicky wrote: Hello, On Wed, May 27, 2015 at 07:44:15PM +0200, Mike Belopuhov wrote: On Wed, May

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-27 Thread Mike Belopuhov
On Wed, May 27, 2015 at 10:39 +0200, Alexandr Nedvedicky wrote: Hello, - if (pf_state_insert(BOUND_IFACE(r, pd-kif), skw, sks, s)) { - pf_state_key_detach(s, PF_SK_STACK); - pf_state_key_detach(s, PF_SK_WIRE); This bug is not yours, but doing two

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-27 Thread Alexandr Nedvedicky
Hello, On Wed, May 27, 2015 at 07:44:15PM +0200, Mike Belopuhov wrote: On Wed, May 27, 2015 at 10:39 +0200, Alexandr Nedvedicky wrote: Hello, - if (pf_state_insert(BOUND_IFACE(r, pd-kif), skw, sks, s)) { - pf_state_key_detach(s, PF_SK_STACK); -

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-26 Thread Mike Belopuhov
On Thu, May 21, 2015 at 21:28 +0200, Alexandr Nedvedicky wrote: Hello, On Thu, May 21, 2015 at 07:43:51PM +0200, Mike Belopuhov wrote: On Thu, May 21, 2015 at 17:34 +0200, Alexandr Nedvedicky wrote: Hello, Hi, snippet below comes from pf_create_state(): 3559

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-22 Thread Henning Brauer
* Alexandr Nedvedicky alexandr.nedvedi...@oracle.com [2015-05-21 21:31]: On Thu, May 21, 2015 at 07:43:51PM +0200, Mike Belopuhov wrote: On Thu, May 21, 2015 at 17:34 +0200, Alexandr Nedvedicky wrote: snippet below comes from pf_create_state(): 3559 if

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-21 Thread Mike Belopuhov
On Thu, May 21, 2015 at 17:34 +0200, Alexandr Nedvedicky wrote: Hello, Hi, snippet below comes from pf_create_state(): 3559 if (pf_state_insert(BOUND_IFACE(r, pd-kif), skw, sks, s)) { 3560 pf_state_key_detach(s, PF_SK_STACK); 3561

Re: pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-21 Thread Alexandr Nedvedicky
Hello, On Thu, May 21, 2015 at 07:43:51PM +0200, Mike Belopuhov wrote: On Thu, May 21, 2015 at 17:34 +0200, Alexandr Nedvedicky wrote: Hello, Hi, snippet below comes from pf_create_state(): 3559 if (pf_state_insert(BOUND_IFACE(r, pd-kif), skw, sks, s)) { 3560

pf_create_state() is sometimes better to use pf_unlink_state()

2015-05-21 Thread Alexandr Nedvedicky
Hello, snippet below comes from pf_create_state(): 3559 if (pf_state_insert(BOUND_IFACE(r, pd-kif), skw, sks, s)) { 3560 pf_state_key_detach(s, PF_SK_STACK); 3561 pf_state_key_detach(s, PF_SK_WIRE); 3562 *sks = *skw = NULL;