After extending return codes testcase by error messages (see last patch) so that it passes legacy iptables, I went on to fix iptables-nft output accordingly. This is all cosmetics but patch 2 which actually simplifies the necessary check for chain existence when trying to create a new user-defined chain. Phil Sutter (5): xtables: Fix error message when zeroing a non-existent chain xtables: Move new chain check to where it belongs xtables: Fix error messages in commands with rule number xtables: Fix error message for chain renaming tests: Extend return codes check by error messages iptables/nft.c | 29 ++++++--- .../testcases/iptables/0004-return-codes_0 | 59 +++++++++++++++---- iptables/xtables.c | 3 - 3 files changed, 67 insertions(+), 24 deletions(-) -- 2.20.1