From 92cc6bd3c5e62623fa37489ec17b331554561c37 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sat, 18 Dec 2010 11:30:29 +0100 Subject: Fix incorrect comparison in check_allowed Wrong enum type was used in the comparison, reported by Jan Engelhardt. --- src/ipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ipset.c') diff --git a/src/ipset.c b/src/ipset.c index e4a82e7..04e77a2 100644 --- a/src/ipset.c +++ b/src/ipset.c @@ -341,7 +341,7 @@ check_allowed(const struct ipset_type *type, enum ipset_cmd cmd) { uint64_t flags = ipset_data_flags(ipset_session_data(session)); uint64_t allowed = type->full[cmd2cmd(cmd)]; - uint64_t cmdflags = cmd == IPSET_CREATE ? IPSET_CREATE_FLAGS : IPSET_ADT_FLAGS; + uint64_t cmdflags = cmd == IPSET_CMD_CREATE ? IPSET_CREATE_FLAGS : IPSET_ADT_FLAGS; const struct ipset_arg *arg = type->args[cmd]; enum ipset_opt i; -- cgit v1.2.3