summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-11-17 11:38:27 +0100
committerPhil Sutter <phil@nwl.cc>2020-11-17 12:52:09 +0100
commit55b7c71dce7144f4dc0297c17abf0f04879ee247 (patch)
tree2f49bbbe63bb05598e9e7f396f4c98075a185c19 /iptables/nft.c
parent83ee6e179829461572be6583ce6e83f68e636eb6 (diff)
ebtables: Fix for broken chain renaming
Loading extensions pollutes 'errno' value, hence before using it to indicate failure it should be sanitized. This was done by the called function before the parsing/netlink split and not migrated by accident. Move it into calling code to clarify the connection. Fixes: a7f1e208cdf9c ("nft: split parsing from netlink commands") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 39882a44..411e2597 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -1896,9 +1896,6 @@ int nft_chain_user_rename(struct nft_handle *h,const char *chain,
return 0;
}
- /* Config load changed errno. Ensure genuine info for our callers. */
- errno = 0;
-
/* Find the old chain to be renamed */
c = nft_chain_find(h, table, chain);
if (c == NULL) {