netfilter: xtables: slightly better error reporting
[deliverable/linux.git] / net / netfilter / xt_state.c
index 4c946cbd731f7cfe47b9333b13c7e861906f9298..2b75230d15ca3800ab3b322eda96d3293b2c3c49 100644 (file)
@@ -37,19 +37,22 @@ state_mt(const struct sk_buff *skb, const struct xt_match_param *par)
        return (sinfo->statemask & statebit);
 }
 
-static bool state_mt_check(const struct xt_mtchk_param *par)
+static int state_mt_check(const struct xt_mtchk_param *par)
 {
-       if (nf_ct_l3proto_try_module_get(par->match->family) < 0) {
-               printk(KERN_WARNING "can't load conntrack support for "
-                                   "proto=%u\n", par->match->family);
-               return false;
+       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 ret;
        }
-       return true;
+       return 0;
 }
 
 static void state_mt_destroy(const struct xt_mtdtor_param *par)
 {
-       nf_ct_l3proto_module_put(par->match->family);
+       nf_ct_l3proto_module_put(par->family);
 }
 
 static struct xt_match state_mt_reg[] __read_mostly = {
This page took 0.024058 seconds and 5 git commands to generate.