mbox series

[nft,0/4] fix list chain x y with anonymous chains

Message ID 20220112003401.332999-1-pablo@netfilter.org
Headers show
Series fix list chain x y with anonymous chains | expand

Message

Pablo Neira Ayuso Jan. 12, 2022, 12:33 a.m. UTC
Hi,

Patches 1 to 3 are cache preparation work.

Then, patch 4 fixes listing

 # nft list chain x y
 table ip x {
        chain y {
                jump {
                        accept
                }
        }
 }

This is broken in the nftables 1.0.1 release.

See https://bugzilla.netfilter.org/show_bug.cgi?id=1577

Pablo Neira Ayuso (4):
  src: do not use the nft_cache_filter object from mnl.c
  cache: do not set error code twice
  cache: add helper function to fill up the rule cache
  src: 'nft list chain' prints anonymous chains correctly

 include/cache.h                               |   3 +
 include/mnl.h                                 |   2 +-
 include/netlink.h                             |   1 +
 src/cache.c                                   | 113 ++++++++++++------
 src/mnl.c                                     |  12 +-
 src/netlink_delinearize.c                     |   8 ++
 .../testcases/cache/0010_implicit_chain_0     |  19 +++
 7 files changed, 113 insertions(+), 45 deletions(-)
 create mode 100755 tests/shell/testcases/cache/0010_implicit_chain_0