Re: [PATCH nf-next 02/11] netfilter: nf_tables: move bind list_head into relevant subtypes

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

 



Hi Florian,

One more question:

On Mon, May 13, 2024 at 03:00:42PM +0200, Florian Westphal wrote:
[...]
> @@ -1621,12 +1620,23 @@ static inline int nft_set_elem_is_dead(const struct nft_set_ext *ext)
>   */
>  struct nft_trans {
>  	struct list_head		list;
> -	struct list_head		binding_list;
>  	int				msg_type;
>  	bool				put_net;
>  	struct nft_ctx			ctx;
>  };
>  
> +/**
> + * struct nft_trans_binding - nf_tables object with binding support in transaction
> + * @nft_trans:    base structure, MUST be first member

This comment says nft_trans MUST be first.

I can add BUILD_BUG_ON for all nft_trans_* objects to check that
nft_trans always comes first (ie. this comes at offset 0 in this
structure).

Thanks.




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

  Powered by Linux