summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-07-21 20:14:09 +0200
committerPhil Sutter <phil@nwl.cc>2023-07-28 14:27:15 +0200
commit344e9b260ba2bbbdd0c32f112273fd552d0b73f4 (patch)
tree32f2070716ef961d5e18096633b3c19392c677dc /iptables/xshared.c
parent4a2b2008fdf4df980433f99a6d8f2003f2005296 (diff)
*tables: Reject invalid chain names when renaming
While given chain name was sanity checked with --new-chain command, --rename-chain command allowed to choose an invalid name. Keep things consistent by adding the missing check. Fixes: e6869a8f59d77 ("reorganized tree after kernel merge") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.c')
-rw-r--r--iptables/xshared.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables/xshared.c b/iptables/xshared.c
index 28c65fae..5f75a0a5 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -1511,6 +1511,7 @@ void do_parse(int argc, char *argv[],
"-%c requires old-chain-name and "
"new-chain-name",
cmd2char(CMD_RENAME_CHAIN));
+ assert_valid_chain_name(p->newname);
break;
case 'P':