Re: ipsec: refactor TDBF_DELETED

2021-11-26 Thread Hrvoje Popovski
On 25.11.2021. 17:13, Tobias Heider wrote: > On Thu, Nov 25, 2021 at 03:50:29PM +0100, Tobias Heider wrote: >> As discussed in the previous thread we can simplify the tdb cleanup >> code by removing the TDBF_DELETED flag and instead checking if the >> tdb was already unlinked. >> >> ok? >> > > Now

Re: ipsec: refactor TDBF_DELETED

2021-11-25 Thread Vitaliy Makkoveev
ok mvs@ > On 26 Nov 2021, at 01:37, Tobias Heider wrote: > > On Fri, Nov 26, 2021 at 01:17:22AM +0300, Vitaliy Makkoveev wrote: >> On Thu, Nov 25, 2021 at 10:59:25PM +0100, Alexander Bluhm wrote: >>> On Thu, Nov 25, 2021 at 05:13:16PM +0100, Tobias Heider wrote: Now with the missing parts f

Re: ipsec: refactor TDBF_DELETED

2021-11-25 Thread Alexander Bluhm
On Thu, Nov 25, 2021 at 11:37:59PM +0100, Tobias Heider wrote: > I agree that the mutex is the better solution. Updated diff below. OK bluhm@ > Index: net/pfkeyv2.c > === > RCS file: /cvs/src/sys/net/pfkeyv2.c,v > retrieving revision

Re: ipsec: refactor TDBF_DELETED

2021-11-25 Thread Tobias Heider
On Fri, Nov 26, 2021 at 01:17:22AM +0300, Vitaliy Makkoveev wrote: > On Thu, Nov 25, 2021 at 10:59:25PM +0100, Alexander Bluhm wrote: > > On Thu, Nov 25, 2021 at 05:13:16PM +0100, Tobias Heider wrote: > > > Now with the missing parts from pfkeyv2.c as noticed by Hrvoje. > > > > We have this code i

Re: ipsec: refactor TDBF_DELETED

2021-11-25 Thread Vitaliy Makkoveev
On Thu, Nov 25, 2021 at 10:59:25PM +0100, Alexander Bluhm wrote: > On Thu, Nov 25, 2021 at 05:13:16PM +0100, Tobias Heider wrote: > > Now with the missing parts from pfkeyv2.c as noticed by Hrvoje. > > We have this code in pfkeyv2_send() > > if (headers[SADB_EXT_ADDRESS_SR

Re: ipsec: refactor TDBF_DELETED

2021-11-25 Thread Alexander Bluhm
On Thu, Nov 25, 2021 at 05:13:16PM +0100, Tobias Heider wrote: > Now with the missing parts from pfkeyv2.c as noticed by Hrvoje. We have this code in pfkeyv2_send() if (headers[SADB_EXT_ADDRESS_SRC] || headers[SADB_EXT_ADDRESS_PROXY]) {

Re: ipsec: refactor TDBF_DELETED

2021-11-25 Thread Tobias Heider
On Thu, Nov 25, 2021 at 03:50:29PM +0100, Tobias Heider wrote: > As discussed in the previous thread we can simplify the tdb cleanup > code by removing the TDBF_DELETED flag and instead checking if the > tdb was already unlinked. > > ok? > Now with the missing parts from pfkeyv2.c as noticed by

ipsec: refactor TDBF_DELETED

2021-11-25 Thread Tobias Heider
As discussed in the previous thread we can simplify the tdb cleanup code by removing the TDBF_DELETED flag and instead checking if the tdb was already unlinked. ok? Index: ip_ipsp.c === RCS file: /cvs/src/sys/netinet/ip_ipsp.c,v retr