Merge branch 'for-linus' of git://www.jni.nu/cris
[deliverable/linux.git] / net / netfilter / xt_connbytes.c
index 136ef4ccdacb77682e6bf2ad9b5a27028f063243..73517835303d4fa68b2b34247d3907e2a7f4c3ca 100644 (file)
@@ -18,7 +18,7 @@ MODULE_ALIAS("ipt_connbytes");
 MODULE_ALIAS("ip6t_connbytes");
 
 static bool
-connbytes_mt(const struct sk_buff *skb, const struct xt_match_param *par)
+connbytes_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_connbytes_info *sinfo = par->matchinfo;
        const struct nf_conn *ct;
@@ -96,24 +96,23 @@ connbytes_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 static int connbytes_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_connbytes_info *sinfo = par->matchinfo;
+       int ret;
 
        if (sinfo->what != XT_CONNBYTES_PKTS &&
            sinfo->what != XT_CONNBYTES_BYTES &&
            sinfo->what != XT_CONNBYTES_AVGPKT)
-               return false;
+               return -EINVAL;
 
        if (sinfo->direction != XT_CONNBYTES_DIR_ORIGINAL &&
            sinfo->direction != XT_CONNBYTES_DIR_REPLY &&
            sinfo->direction != XT_CONNBYTES_DIR_BOTH)
-               return false;
+               return -EINVAL;
 
-       if (nf_ct_l3proto_try_module_get(par->family) < 0) {
+       ret = nf_ct_l3proto_try_module_get(par->family);
+       if (ret < 0)
                pr_info("cannot load conntrack support for proto=%u\n",
                        par->family);
-               return false;
-       }
-
-       return true;
+       return ret;
 }
 
 static void connbytes_mt_destroy(const struct xt_mtdtor_param *par)
This page took 0.033388 seconds and 5 git commands to generate.