summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-18 11:30:29 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-18 11:30:29 +0100
commit92cc6bd3c5e62623fa37489ec17b331554561c37 (patch)
treed331255b7123c79962f432cc36994ef26664205c
parent0b864252f72fd6e6638490d887c65b53d37aaf11 (diff)
Fix incorrect comparison in check_allowed
Wrong enum type was used in the comparison, reported by Jan Engelhardt.
-rw-r--r--src/ipset.c2
1 files changed, 1 insertions, 1 deletions
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;