]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/xt_recent.c
Merge branch 'master' of /repos/git/net-next-2.6
[net-next-2.6.git] / net / netfilter / xt_recent.c
index 0d9f80b1dd9fc789ffa7f4148cd926c8e0efe369..b88d63b9c76ac13598b1efdbbd55ddcb6d4346ef 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/bitops.h>
 #include <linux/skbuff.h>
 #include <linux/inet.h>
+#include <linux/slab.h>
 #include <net/net_namespace.h>
 #include <net/netns/generic.h>
 
@@ -284,7 +285,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;
                        }