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 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().



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

  Powered by Linux