From 344e9b260ba2bbbdd0c32f112273fd552d0b73f4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 21 Jul 2023 20:14:09 +0200 Subject: *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 --- iptables/xshared.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables/xshared.c') 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': -- cgit v1.2.3