Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
[safe/jmp/linux-2.6] / net / netfilter / xt_rateest.c
index 4dcfd73..4fc6a91 100644 (file)
 #include <net/netfilter/xt_rateest.h>
 
 
-static bool xt_rateest_mt(const struct sk_buff *skb,
-                         const struct net_device *in,
-                         const struct net_device *out,
-                         const struct xt_match *match,
-                         const void *matchinfo,
-                         int offset,
-                         unsigned int protoff,
-                         bool *hotdrop)
+static bool
+xt_rateest_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct xt_rateest_match_info *info = matchinfo;
+       const struct xt_rateest_match_info *info = par->matchinfo;
        struct gnet_stats_rate_est *r;
        u_int32_t bps1, bps2, pps1, pps2;
        bool ret = true;
@@ -72,7 +66,7 @@ static bool xt_rateest_mt(const struct sk_buff *skb,
                if (info->flags & XT_RATEEST_MATCH_BPS)
                        ret &= bps1 == bps2;
                if (info->flags & XT_RATEEST_MATCH_PPS)
-                       ret &= pps2 == pps2;
+                       ret &= pps1 == pps2;
                break;
        }
 
@@ -80,13 +74,9 @@ static bool xt_rateest_mt(const struct sk_buff *skb,
        return ret;
 }
 
-static bool xt_rateest_mt_checkentry(const char *tablename,
-                                    const void *ip,
-                                    const struct xt_match *match,
-                                    void *matchinfo,
-                                    unsigned int hook_mask)
+static bool xt_rateest_mt_checkentry(const struct xt_mtchk_param *par)
 {
-       struct xt_rateest_match_info *info = matchinfo;
+       struct xt_rateest_match_info *info = par->matchinfo;
        struct xt_rateest *est1, *est2;
 
        if (hweight32(info->flags & (XT_RATEEST_MATCH_ABS |
@@ -127,10 +117,9 @@ err1:
        return false;
 }
 
-static void xt_rateest_mt_destroy(const struct xt_match *match,
-                                 void *matchinfo)
+static void xt_rateest_mt_destroy(const struct xt_mtdtor_param *par)
 {
-       struct xt_rateest_match_info *info = matchinfo;
+       struct xt_rateest_match_info *info = par->matchinfo;
 
        xt_rateest_put(info->est1);
        if (info->est2)