]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/xt_connbytes.c
8139cp: fix checksum broken
[net-next-2.6.git] / net / netfilter / xt_connbytes.c
index 73517835303d4fa68b2b34247d3907e2a7f4c3ca..5b138506690ec578105911ffb64309b5297d6458 100644 (file)
@@ -112,6 +112,16 @@ static int connbytes_mt_check(const struct xt_mtchk_param *par)
        if (ret < 0)
                pr_info("cannot load conntrack support for proto=%u\n",
                        par->family);
+
+       /*
+        * This filter cannot function correctly unless connection tracking
+        * accounting is enabled, so complain in the hope that someone notices.
+        */
+       if (!nf_ct_acct_enabled(par->net)) {
+               pr_warning("Forcing CT accounting to be enabled\n");
+               nf_ct_set_acct(par->net, true);
+       }
+
        return ret;
 }