mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-24 10:37:52 +04:00
An RTL839x route counts its packets in a LOG counter it takes from otto_stats_packet_cntr_alloc(), and only the tc flower offload clears counters, those of its own rules. A counter last used by a route still holds that route's count when it is freed, so the next route that takes it shows those packets in debugfs before it has forwarded one. Clear the counter when the route takes it. On an HPE 1920-48G (RTL8393), a route to 10.99.0.0/17 that took the counter of a deleted route to 10.99.0.0/16 showed 8 packets before any traffic and 16 after 8 routed ones; with this change 0 and 8. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Gennaro Cimmino <gcimmino@rayonra.net> Link: https://github.com/openwrt/openwrt/pull/25907 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>