]> git.hungrycats.org Git - linux/commitdiff
Netfilter trivial fixes:
authorDavid S. Miller <davem@nuts.ninka.net>
Tue, 30 Apr 2002 19:25:04 +0000 (12:25 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 30 Apr 2002 19:25:04 +0000 (12:25 -0700)
- net/core/netfilter.c (overlap): Overlap calculation error.
- net/ipv6/netfilter/ip6_tables.c: Misplaced parentheses leads
to pointer calculation error on SMP.

net/core/netfilter.c
net/ipv6/netfilter/ip6_tables.c

index 8d1e617fc67b0700cd5e5c5a21e4a4d2036d9357..816c063896d9fe319f07d23512f4d637642b031d 100644 (file)
@@ -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). */
index 4cf0325196dc6b9cd5379a15af8dcec0d09c6499..df14640c4528000c4e555b8bb35ac9c6d5908094 100644 (file)
@@ -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));
        }