path: root/iptables/xtables-eb.c
diff options
authorPhil Sutter <>2018-08-15 12:34:24 +0200
committerPablo Neira Ayuso <>2018-08-16 19:43:47 +0200
commit7bccf30750cb7ad7d56921c220a95a7781316a7b (patch)
tree98c552dd0f1cf7b40ffe42fa52eb036c5e19b3f2 /iptables/xtables-eb.c
parent3d9a13dda3d77f750ee755aa0909519240380251 (diff)
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 <>
Diffstat (limited to 'iptables/xtables-eb.c')
1 files changed, 0 insertions, 2 deletions
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:
- if (!(flags & OPT_ZERO))
- exit(0);
if (flags & OPT_ZERO) {
selected_chain = zerochain;