From 3d5ffca9db521d5bd8868760ee1c5263e0d25c1d Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sun, 20 Sep 2020 13:06:59 +0200 Subject: Support the -exist flag with the destroy command The -exist flag was supported with the create, add and delete commands. In order to gracefully handle the destroy command with nonexistent sets, the -exist flag is added to destroy too. Signed-off-by: Jozsef Kadlecsik --- lib/mnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mnl.c') diff --git a/lib/mnl.c b/lib/mnl.c index cc5124d..d1f5ba5 100644 --- a/lib/mnl.c +++ b/lib/mnl.c @@ -34,7 +34,7 @@ struct ipset_handle { static const uint16_t cmdflags[] = { [IPSET_CMD_CREATE-1] = NLM_F_REQUEST|NLM_F_ACK| NLM_F_CREATE|NLM_F_EXCL, - [IPSET_CMD_DESTROY-1] = NLM_F_REQUEST|NLM_F_ACK, + [IPSET_CMD_DESTROY-1] = NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL, [IPSET_CMD_FLUSH-1] = NLM_F_REQUEST|NLM_F_ACK, [IPSET_CMD_RENAME-1] = NLM_F_REQUEST|NLM_F_ACK, [IPSET_CMD_SWAP-1] = NLM_F_REQUEST|NLM_F_ACK, -- cgit v1.2.3