Re: [PATCH v2 nf-next] netfilter: nf_tables: add userdata attributes to nft_chain

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

 



On Wed, Sep 23, 2020 at 12:55:17PM +0200, Jose M. Guisado Gomez wrote:
> @@ -2079,15 +2098,21 @@ static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
>  	err = nft_chain_add(table, chain);
>  	if (err < 0) {
>  		nft_trans_destroy(trans);
> -		goto err2;
> +		goto err_chain_add;
>  	}
>  
>  	table->use++;
>  
>  	return 0;
> -err2:
> +err_chain_add:
> +err_trans:

I suggest to replace these two tags by:

err_unregister_hook:

>  	nf_tables_unregister_hook(net, table, chain);
> -err1:
> +err_register_hook:
> +err_alloc_rules:

and these two above by:

err_free_udata:

> +	kfree(chain->udata);
> +err_userdata:
> +err_chain_name:
> +err_flag:

and these three by:

err_destroy_chain:

>  	nf_tables_chain_destroy(ctx);
>  
>  	return err;

Thanks.



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

  Powered by Linux