summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-03-16 17:14:07 +0100
committerPhil Sutter <phil@nwl.cc>2022-03-17 09:55:48 +0100
commitb1aee6b2238794446feba41778f88703784560f7 (patch)
tree13be8d334a7e9a2212e7a468124003fc485d23b1 /iptables/xshared.h
parentb555bfed542635259c489596630a75fce50aab1b (diff)
nft: Reject standard targets as chain names when restoring
Reuse parse_chain() called from do_parse() for '-N' and rename it for a better description of what it does. Note that by itself, this patch will likely kill iptables-restore performance for big rulesets due to the extra extension lookup for chain lines. A following patch announcing those chains to libxtables will alleviate that. Signed-off-by: Phil Sutter <phil@nwl.cc> Reviewed-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r--iptables/xshared.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/xshared.h b/iptables/xshared.h
index 0de0e12e..ca761ee7 100644
--- a/iptables/xshared.h
+++ b/iptables/xshared.h
@@ -244,7 +244,7 @@ char cmd2char(int option);
void add_command(unsigned int *cmd, const int newcmd,
const int othercmds, int invert);
int parse_rulenumber(const char *rule);
-void parse_chain(const char *chainname);
+void assert_valid_chain_name(const char *chainname);
void generic_opt_check(int command, int options);
char opt2char(int option);