aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/netfilter_ipv6.h1
-rw-r--r--net/ipv6/netfilter/ip6table_raw.c2
-rw-r--r--net/netfilter/xt_hashlimit.c4
-rw-r--r--net/netfilter/xt_recent.c2
4 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index d654873aa25a..1f7e300094cd 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -59,6 +59,7 @@
59enum nf_ip6_hook_priorities { 59enum nf_ip6_hook_priorities {
60 NF_IP6_PRI_FIRST = INT_MIN, 60 NF_IP6_PRI_FIRST = INT_MIN,
61 NF_IP6_PRI_CONNTRACK_DEFRAG = -400, 61 NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
62 NF_IP6_PRI_RAW = -300,
62 NF_IP6_PRI_SELINUX_FIRST = -225, 63 NF_IP6_PRI_SELINUX_FIRST = -225,
63 NF_IP6_PRI_CONNTRACK = -200, 64 NF_IP6_PRI_CONNTRACK = -200,
64 NF_IP6_PRI_MANGLE = -150, 65 NF_IP6_PRI_MANGLE = -150,
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c
index aef31a29de9e..b9cf7cd61923 100644
--- a/net/ipv6/netfilter/ip6table_raw.c
+++ b/net/ipv6/netfilter/ip6table_raw.c
@@ -13,7 +13,7 @@ static const struct xt_table packet_raw = {
13 .valid_hooks = RAW_VALID_HOOKS, 13 .valid_hooks = RAW_VALID_HOOKS,
14 .me = THIS_MODULE, 14 .me = THIS_MODULE,
15 .af = NFPROTO_IPV6, 15 .af = NFPROTO_IPV6,
16 .priority = NF_IP6_PRI_FIRST, 16 .priority = NF_IP6_PRI_RAW,
17}; 17};
18 18
19/* The work comes in here from netfilter.c. */ 19/* The work comes in here from netfilter.c. */
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 9e9c48963942..215a64835de8 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)
493 case 64 ... 95: 493 case 64 ... 95:
494 i[2] = maskl(i[2], p - 64); 494 i[2] = maskl(i[2], p - 64);
495 i[3] = 0; 495 i[3] = 0;
496 break;
496 case 96 ... 127: 497 case 96 ... 127:
497 i[3] = maskl(i[3], p - 96); 498 i[3] = maskl(i[3], p - 96);
498 break; 499 break;
@@ -879,7 +880,8 @@ static void dl_seq_stop(struct seq_file *s, void *v)
879 struct xt_hashlimit_htable *htable = s->private; 880 struct xt_hashlimit_htable *htable = s->private;
880 unsigned int *bucket = (unsigned int *)v; 881 unsigned int *bucket = (unsigned int *)v;
881 882
882 kfree(bucket); 883 if (!IS_ERR(bucket))
884 kfree(bucket);
883 spin_unlock_bh(&htable->lock); 885 spin_unlock_bh(&htable->lock);
884} 886}
885 887
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
index 7073dbb8100c..971d172afece 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)
267 for (i = 0; i < e->nstamps; i++) { 267 for (i = 0; i < e->nstamps; i++) {
268 if (info->seconds && time_after(time, e->stamps[i])) 268 if (info->seconds && time_after(time, e->stamps[i]))
269 continue; 269 continue;
270 if (info->hit_count && ++hits >= info->hit_count) { 270 if (!info->hit_count || ++hits >= info->hit_count) {
271 ret = !ret; 271 ret = !ret;
272 break; 272 break;
273 } 273 }