Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / net / netfilter / xt_connbytes.c
index e595e07a759b2df8ccdce5069d1974ec6ccaa754..1e634615ab9d6e4b2a5c7db5872332c5a522f435 100644 (file)
@@ -26,16 +26,18 @@ connbytes_mt(const struct sk_buff *skb, struct xt_action_param *par)
        u_int64_t what = 0;     /* initialize to make gcc happy */
        u_int64_t bytes = 0;
        u_int64_t pkts = 0;
+       const struct nf_conn_acct *acct;
        const struct nf_conn_counter *counters;
 
        ct = nf_ct_get(skb, &ctinfo);
        if (!ct)
                return false;
 
-       counters = nf_conn_acct_find(ct);
-       if (!counters)
+       acct = nf_conn_acct_find(ct);
+       if (!acct)
                return false;
 
+       counters = acct->counter;
        switch (sinfo->what) {
        case XT_CONNBYTES_PKTS:
                switch (sinfo->direction) {