]> git.ipfire.org Git - thirdparty/nftables.git/commit
rule: fix stateless output after listing sets containing counters
authorJeremy Sowden <jeremy@azazel.net>
Thu, 7 Oct 2021 20:12:21 +0000 (21:12 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 11 Oct 2021 23:06:51 +0000 (01:06 +0200)
commitf1d26b51fde8f4ff12f5c98ef8b65229a17276e3
tree8dfa3f42d64f993b5ed74bb57ed35e95dc2851e7
parentb487f4d0e436522acbef938ff4751626406b24c8
rule: fix stateless output after listing sets containing counters

Before outputting counters in set definitions the
`NFT_CTX_OUTPUT_STATELESS` flag was set to suppress output of the
counter state and unconditionally cleared afterwards, regardless of
whether it had been originally set.  Record the original set of flags
and restore it.

Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994273
Fixes: 6d80e0f15492 ("src: support for counter in set definition")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/rule.c