]> git.ipfire.org Git - thirdparty/nftables.git/commit
cache: Always set NFT_CACHE_TERSE for list cmd with --terse
authorPhil Sutter <phil@nwl.cc>
Thu, 8 Feb 2024 01:10:48 +0000 (02:10 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 13 Feb 2024 11:03:26 +0000 (12:03 +0100)
commitcd4e947032a57a585b1a457ce03f546afc7ba033
tree707211d627184edaeebac386e51e6506548739f8
parent8a34cca265a290a0b23cec27d5258bc432cef3d3
cache: Always set NFT_CACHE_TERSE for list cmd with --terse

This fixes at least 'nft -t list table ...' and 'nft -t list set ...'.

Note how --terse handling for 'list sets/maps' remains in place since
setting NFT_CACHE_TERSE does not fully undo NFT_CACHE_SETELEM: setting
both enables fetching of anonymous sets which is pointless for that
command.

Reported-by: anton.khazan@gmail.com
Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1735
Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/cache.c