From: Jozsef Kadlecsik Date: Sat, 18 Dec 2010 10:30:29 +0000 (+0100) Subject: Fix incorrect comparison in check_allowed X-Git-Tag: v5.1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92cc6bd3c5e62623fa37489ec17b331554561c37;p=thirdparty%2Fipset.git Fix incorrect comparison in check_allowed Wrong enum type was used in the comparison, reported by Jan Engelhardt. --- diff --git a/src/ipset.c b/src/ipset.c index e4a82e7b..04e77a29 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;