Re: [PATCH iptables-compat 2/3] iptables-compat: do not fail on restore if user chain exists

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

 



On 4 May 2018 at 11:49, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
>
> +int nft_table_flush(struct nft_handle *h, const char *table)
> +{
> +       struct nftnl_table *r;
> +       int ret = 0;
> +
> +       nft_fn = nft_table_flush;
> +
> +       r = nftnl_table_alloc();
> +       if (r == NULL)
> +               goto err;
> +
> +       nftnl_table_set_str(r, NFTNL_TABLE_NAME, table);
> +
> +       batch_table_add(h, NFT_COMPAT_TABLE_FLUSH, r);
> +err:
> +       /* the core expects 1 for success and 0 for error */
> +       return ret == 0 ? 1 : 0;
> +}
> +

it seems ret is never set to something meaningful?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux