mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
QCMAP: Packet counters are not updated in conntrack
Return value of counter api returns s64 instead of u64 Type-casting to the right type. Change-Id: I8f399ccd52ec4e4f4b23d39f3faa7bb6f23262cc Acked-by: Vinisha Varre <vvarre@qti.qualcomm.com> Signed-off-by: Paras Jain <parassin@codeaurora.org>
This commit is contained in:
parent
37a1126894
commit
a64c3b212f
2 changed files with 4 additions and 4 deletions
|
|
@ -1888,8 +1888,8 @@ acct:
|
|||
[CTINFO2DIR(ctinfo)].bytes);
|
||||
|
||||
pkts =
|
||||
atomic64_read(&counter[CTINFO2DIR(ctinfo)].packets) +
|
||||
atomic64_read(&counter[!CTINFO2DIR(ctinfo)].packets);
|
||||
((u64)atomic64_read(&counter[CTINFO2DIR(ctinfo)].packets)) +
|
||||
((u64)atomic64_read(&counter[!CTINFO2DIR(ctinfo)].packets));
|
||||
/* Report if the packet threshold is reached. */
|
||||
if (nf_conntrack_pkt_threshold > 0 &&
|
||||
pkts == nf_conntrack_pkt_threshold) {
|
||||
|
|
|
|||
|
|
@ -245,8 +245,8 @@ dump_counters(struct sk_buff *skb, struct nf_conn_acct *acct,
|
|||
pkts = atomic64_xchg(&counter[dir].packets, 0);
|
||||
bytes = atomic64_xchg(&counter[dir].bytes, 0);
|
||||
} else {
|
||||
pkts = atomic64_read(&counter[dir].packets);
|
||||
bytes = atomic64_read(&counter[dir].bytes);
|
||||
pkts = (u64)atomic64_read(&counter[dir].packets);
|
||||
bytes = (u64)atomic64_read(&counter[dir].bytes);
|
||||
}
|
||||
|
||||
nest_count = nla_nest_start(skb, attr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue