Re: [PATCH 1/2 nf-next v2] netfilter: nf_tables: Introduce stateful object update operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 23, 2019 at 02:41:42PM +0200, Pablo Neira Ayuso wrote:
> On Thu, Aug 22, 2019 at 06:48:26PM +0200, Fernando Fernandez Mancera wrote:
> > @@ -1405,10 +1409,16 @@ struct nft_trans_elem {
> >  
> >  struct nft_trans_obj {
> >  	struct nft_object		*obj;
> > +	struct nlattr			**tb;
> 
> Instead of annotatint tb[] on the object, you can probably add here:
> 
> union {
>         struct quota {
>                 uint64_t                consumed;
>                 uint64_t                quota;
>       } quota;
> };
> 
> So the initial update annotates the values in the transaction.
> 
> I guess you will need two new indirections? Something like
> prepare_update() and update().

Or you have a single update() and pass enum nft_trans_phase as
parameter, so this only needs one single indirection.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux