Commit bc5359b2 authored by David S. Miller's avatar David S. Miller

Netfilter trivial fixes:

- net/core/netfilter.c (overlap): Overlap calculation error.
- net/ipv6/netfilter/ip6_tables.c: Misplaced parentheses leads
to pointer calculation error on SMP.
parent 15448185
......@@ -83,8 +83,7 @@ void nf_unregister_hook(struct nf_hook_ops *reg)
/* Do exclusive ranges overlap? */
static inline int overlap(int min1, int max1, int min2, int max2)
{
return (min1 >= min2 && min1 < max2)
|| (max1 > min2 && max1 <= max2);
return max1 > min2 && min1 < max2;
}
/* Functions to register sockopt ranges (exclusive). */
......
......@@ -914,7 +914,7 @@ translate_table(const char *name,
/* And one copy for every other CPU */
for (i = 1; i < smp_num_cpus; i++) {
memcpy(newinfo->entries + SMP_ALIGN(newinfo->size*i),
memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i,
newinfo->entries,
SMP_ALIGN(newinfo->size));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment