]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_connbytes.c
[WATCHDOG] Fix build with CONFIG_ITCO_VENDOR_SUPPORT=n
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_connbytes.c
index b15e7e2fa14328612cdf4de25150cc62604e8a58..3e39c4fe1931b4f91655b406eee2f5bca9395c7d 100644 (file)
@@ -4,11 +4,11 @@
 #include <linux/module.h>
 #include <linux/bitops.h>
 #include <linux/skbuff.h>
+#include <linux/math64.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_connbytes.h>
 #include <net/netfilter/nf_conntrack.h>
-
-#include <asm/div64.h>
+#include <net/netfilter/nf_conntrack_acct.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
@@ -28,12 +28,15 @@ connbytes_mt(const struct sk_buff *skb, const struct net_device *in,
        u_int64_t what = 0;     /* initialize to make gcc happy */
        u_int64_t bytes = 0;
        u_int64_t pkts = 0;
-       const struct ip_conntrack_counter *counters;
+       const struct nf_conn_counter *counters;
 
        ct = nf_ct_get(skb, &ctinfo);
        if (!ct)
                return false;
-       counters = ct->counters;
+
+       counters = nf_conn_acct_find(ct);
+       if (!counters)
+               return false;
 
        switch (sinfo->what) {
        case XT_CONNBYTES_PKTS:
@@ -82,7 +85,7 @@ connbytes_mt(const struct sk_buff *skb, const struct net_device *in,
                        break;
                }
                if (pkts != 0)
-                       what = div64_64(bytes, pkts);
+                       what = div64_u64(bytes, pkts);
                break;
        }