diff options
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/nft.c | 2 | ||||
-rwxr-xr-x | iptables/tests/shell/testcases/iptables/0004-return-codes_0 | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/iptables/nft.c b/iptables/nft.c index 1cb104e7..020553a4 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -3860,7 +3860,7 @@ bool nft_is_table_compatible(struct nft_handle *h, if (chain) { struct nft_chain *c = nft_chain_find(h, table, chain); - return c && !nft_is_chain_compatible(c, h); + return !c || !nft_is_chain_compatible(c, h); } return !nft_chain_foreach(h, table, nft_is_chain_compatible, h); diff --git a/iptables/tests/shell/testcases/iptables/0004-return-codes_0 b/iptables/tests/shell/testcases/iptables/0004-return-codes_0 index 33c5f1f3..234f3040 100755 --- a/iptables/tests/shell/testcases/iptables/0004-return-codes_0 +++ b/iptables/tests/shell/testcases/iptables/0004-return-codes_0 @@ -58,6 +58,7 @@ cmd 1 "$ENOENT" -Z bar cmd 0 -E foo bar cmd 1 "$EEXIST_F" -E foo bar cmd 1 "$ENOENT" -E foo bar2 +cmd 1 "$ENOENT" -L foo cmd 0 -N foo2 cmd 1 "$EEXIST_F" -E foo2 bar |