[Bug 1386] New: nftables.py cmd doesn't read updated counter values after first read
bugzilla-daemon at netfilter.org
bugzilla-daemon at netfilter.org
Wed Dec 4 17:44:45 CET 2019
https://bugzilla.netfilter.org/show_bug.cgi?id=1386
Bug ID: 1386
Summary: nftables.py cmd doesn't read updated counter values
after first read
Product: nftables
Version: unspecified
Hardware: x86_64
OS: Gentoo
Status: NEW
Severity: major
Priority: P5
Component: nft
Assignee: pablo at netfilter.org
Reporter: karel at unitednetworks.cz
Created attachment 577
--> https://bugzilla.netfilter.org/attachment.cgi?id=577&action=edit
example of nftables.py not reading updated counter state
System:
Gentoo 5.4.1 x86_64
nft up to date from GIT as of 4.12.2019
CPython 3.6.9
Overview:
nft commands which read named counters actually read counter values only first
time, subsequent reads returns values from first read.
Detailed info:
Consider this ruleset:
add table ip table1
add counter ip table1 counter1
add chain ip table1 chain1 { type filter hook input priority 0; }
add rule ip table1 chain1 counter name counter1
Then ping several times localhost, after that call nftables.py cmd:
list counter table1 counter1
and you will see some packets added to this counter. Ping localhost several
times again and call nftables.py cmd again:
list counter table1 counter1
and you will see same counter values as in first call without adding some
packets from second pinging. But when running nft from shell:
nft list counter table1 counter1
the values returned will be different from second call through nftables.py cmd
and will account packets from second pinging.
See attached example.
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20191204/b2e08fb8/attachment.html>
More information about the netfilter-buglog
mailing list