Hi Pablo, On Tue, Jun 18, 2019 at 12:09 AM Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > > Hi Laura, > > On Mon, Jun 17, 2019 at 06:14:24PM +0200, Laura Garcia Liebana wrote: > [...] > > diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c > > index 8394560aa695..df19844e994f 100644 > > --- a/net/netfilter/nft_dynset.c > > +++ b/net/netfilter/nft_dynset.c > > @@ -24,6 +24,7 @@ struct nft_dynset { > > enum nft_registers sreg_data:8; > > bool invert; > > u64 timeout; > > + u64 expiration; > > struct nft_expr *expr; > > struct nft_set_binding binding; > > }; > > @@ -51,16 +52,18 @@ static void *nft_dynset_new(struct nft_set *set, const struct nft_expr *expr, > > const struct nft_dynset *priv = nft_expr_priv(expr); > > struct nft_set_ext *ext; > > u64 timeout; > > + u64 expiration; > > void *elem; > > > > if (!atomic_add_unless(&set->nelems, 1, set->size)) > > return NULL; > > > > timeout = priv->timeout ? : set->timeout; > > + expiration = priv->expiration; > > elem = nft_set_elem_init(set, &priv->tmpl, > > ®s->data[priv->sreg_key], > > ®s->data[priv->sreg_data], > > - timeout, GFP_ATOMIC); > > + timeout, expiration, GFP_ATOMIC); > ^^^^^^^^^^ > > Probably better to replace 'expiration' by 0? priv->expiration is > never used / always set to zero, right? > That's right, in this case could be always set to 0. Will send an v2. Thank you.