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@xxxxxx> --- iptables/xshared.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iptables/xshared.c b/iptables/xshared.c index 28c65faed7b25..5f75a0a57a023 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': -- 2.40.0