Re: [PATCH nf] netfilter: x_tables: speed up jump target validation

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

 



Florian Westphal <fw@xxxxxxxxx> wrote:
> +	offsets = xt_alloc_entry_offsets(newinfo->number);
> +	if (!offsets)
> +		return -ENOMEM;
>  	i = 0;
>  	/* Walk through entries, checking offsets. */
>  	xt_entry_foreach(iter, entry0, newinfo->size) {
> @@ -717,15 +711,18 @@ translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0,
>  						 repl->underflow,
>  						 repl->valid_hooks);
>  		if (ret != 0)
> -			return ret;
> +			goto out_free;
> +		if (offsets && i < repl->num_entries)
> +			offsets[i] = (void *)iter - entry0;
>  		++i;

Ahem.  This superflous "offsets &&" hunk is a left-over of the old
version that did not -ENOMEM on xt_alloc_entry_offsets error.

I will submit a v2 tomorrow that removes this part.
--
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