nf_conntrack_acct: use skb->len for accounting
Subsystems (3)
PATCH 1/1 nf_conntrack_acct: use skb->len for accounting
nf_conntrack_acct: use skb->len for accounting
use skb->len for accounting as xt_quota does. Since nf_conntrack works at the network layer, skb_network_offset should always returns ZERO.
Signed-off-by Changli Gao <[email protected]>
----
net/netfilter/nf_conntrack_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/netfilter/nf_conntrack_core.c +1 -2
@@ -966,8 +966,7 @@ acct:if (acct) {spin_lock_bh (&ct->lock); acct[CTINFO2DIR (ctinfo)].packets++; - acct[CTINFO2DIR (ctinfo)].bytes += - skb->len -skb_network_offset (skb); + acct[CTINFO2DIR (ctinfo)].bytes += skb->len;spin_unlock_bh (&ct->lock); } }
Patrick McHardy
AppliedQuoted 2 lines · Changli Gao
use
skb->lenfor accounting asxt_quotadoes. Sincenf_conntrackworks at the network layer,skb_network_offsetshould always returns ZERO.
Applied.