]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/netfilter/xt_connbytes.c
Merge branch 'upstream' into for-linus
[mv-sheeva.git] / net / netfilter / xt_connbytes.c
index bf8e286361c3fd7c05d92f161b40012615ced76e..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,6 +96,7 @@ 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 &&
@@ -107,13 +108,11 @@ static int connbytes_mt_check(const struct xt_mtchk_param *par)
            sinfo->direction != XT_CONNBYTES_DIR_BOTH)
                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 -EINVAL;
-       }
-
-       return 0;
+       return ret;
 }
 
 static void connbytes_mt_destroy(const struct xt_mtdtor_param *par)