diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-25 11:48:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-25 11:48:58 -0700 |
commit | 80bb3a00fa314e3c5dbbd23a38bfaf94f2402b99 (patch) | |
tree | ef2e5b4dde5ef7674b5cc713db9dc925d1f98f15 /net/netfilter | |
parent | 9a127aad4d60968fba96622008ea0d243688f2b0 (diff) | |
parent | 8f5992291457c8e6de2f5fe39849de6756be1a96 (diff) | |
download | kernel_samsung_espresso10-80bb3a00fa314e3c5dbbd23a38bfaf94f2402b99.zip kernel_samsung_espresso10-80bb3a00fa314e3c5dbbd23a38bfaf94f2402b99.tar.gz kernel_samsung_espresso10-80bb3a00fa314e3c5dbbd23a38bfaf94f2402b99.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_hashlimit.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_recent.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 9e9c489..215a648 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -493,6 +493,7 @@ static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) case 64 ... 95: i[2] = maskl(i[2], p - 64); i[3] = 0; + break; case 96 ... 127: i[3] = maskl(i[3], p - 96); break; @@ -879,7 +880,8 @@ static void dl_seq_stop(struct seq_file *s, void *v) struct xt_hashlimit_htable *htable = s->private; unsigned int *bucket = (unsigned int *)v; - kfree(bucket); + if (!IS_ERR(bucket)) + kfree(bucket); spin_unlock_bh(&htable->lock); } diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 7073dbb..971d172 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -267,7 +267,7 @@ recent_mt(const struct sk_buff *skb, const struct xt_match_param *par) for (i = 0; i < e->nstamps; i++) { if (info->seconds && time_after(time, e->stamps[i])) continue; - if (info->hit_count && ++hits >= info->hit_count) { + if (!info->hit_count || ++hits >= info->hit_count) { ret = !ret; break; } |