From 7bccf30750cb7ad7d56921c220a95a7781316a7b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Aug 2018 12:34:24 +0200 Subject: ebtables: Fix for listing of non-existent chains When trying to list a non-existent chain, ebtables-nft would just print the table header and then exit with a code of zero. In order to be more consistent with legacy ebtables, change the code to: * Print table header only if chosen chain is found and * propagate the error condition if chain was not found to print an error message. Note that this does not establish full parity with legacy ebtables due to the error code being 1 instead of 255 and the error message differing from the legacy one. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- iptables/xtables-eb.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'iptables/xtables-eb.c') diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index a46b9e5a..534714de 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -1294,8 +1294,6 @@ check_extension: /*flags&OPT_EXPANDED*/0, flags&LIST_N, flags&LIST_C); - if (!(flags & OPT_ZERO)) - exit(0); } if (flags & OPT_ZERO) { selected_chain = zerochain; -- cgit v1.2.3