]> git.ipfire.org Git - thirdparty/iptables.git/commit
libiptc: fix wrong maptype of base chain counters on restore
authorJan Engelhardt <jengelh@medozas.de>
Mon, 26 Oct 2009 17:43:54 +0000 (18:43 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 29 Oct 2009 18:04:00 +0000 (19:04 +0100)
commit7c4d668c9c2ee007c82063b7fc784cbbf46b2ec4
tree4041a5c3946326232ad24aa5499a8ac4633a5976
parent58df90174164fd673e8c4103f7ce0c4e55ef1aec
libiptc: fix wrong maptype of base chain counters on restore

When a ruleset that does not reset any chain policies/counters, such as

*filter
COMMIT

is sourced by iptables-restore, the previous policy and counters
(i.e. the ones read from the kernel) are reused. The counter skew
offsetting is wrong however, causing the read value to be readded to
the kernel value. This manifests itself in practice by the counter
value almost doubling everytime iptables-restore is called.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
libiptc/libiptc.c