]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_ct: Fix byte count on fragmented packets
authorPaul Blakey <paulb@nvidia.com>
Sun, 17 Oct 2021 11:58:51 +0000 (14:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Oct 2021 12:31:58 +0000 (13:31 +0100)
commit99d2c6d904c7c326c7377bf3221ae0dbf77d4613
tree4f06d9227897803e594dd7e5851243e82b0f17a4
parent92d02003b2d9fb208c4ba84aea9599a8b114704e
net/sched: act_ct: Fix byte count on fragmented packets

First fragmented packets (frag offset = 0) byte len is zeroed
when stolen by ip_defrag(). And since act_ct update the stats
only afterwards (at end of execute), bytes aren't correctly
accounted for such packets.

To fix this, move stats update to start of action execute.

Fixes: 1a23a38cf53c ("net/sched: Introduce action ct")
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ct.c