mac80211: fix function pointer check
[safe/jmp/linux-2.6] / net / netfilter / xt_connmark.c
index e137af5..7278145 100644 (file)
@@ -37,7 +37,7 @@ MODULE_ALIAS("ipt_connmark");
 MODULE_ALIAS("ip6t_connmark");
 
 static unsigned int
-connmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
+connmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
 {
        const struct xt_connmark_tginfo1 *info = par->targinfo;
        enum ip_conntrack_info ctinfo;
@@ -76,12 +76,13 @@ connmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
 
 static int connmark_tg_check(const struct xt_tgchk_param *par)
 {
-       if (nf_ct_l3proto_try_module_get(par->family) < 0) {
+       int ret;
+
+       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 connmark_tg_destroy(const struct xt_tgdtor_param *par)
@@ -90,7 +91,7 @@ static void connmark_tg_destroy(const struct xt_tgdtor_param *par)
 }
 
 static bool
-connmark_mt(const struct sk_buff *skb, const struct xt_match_param *par)
+connmark_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_connmark_mtinfo1 *info = par->matchinfo;
        enum ip_conntrack_info ctinfo;
@@ -105,12 +106,13 @@ connmark_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 
 static int connmark_mt_check(const struct xt_mtchk_param *par)
 {
-       if (nf_ct_l3proto_try_module_get(par->family) < 0) {
+       int ret;
+
+       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 connmark_mt_destroy(const struct xt_mtdtor_param *par)