summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-06-19 22:06:59 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-06-19 22:06:59 +0200
commit59d72e349a19da49d22934c1cdab914c3087c702 (patch)
treeaa0ddc4bbb25c090b5de14372383e3dcacaa6f04 /include
parented668b564ed32d1784f6a8b25b3c130e0d6a9ee9 (diff)
The commandline parser was too permissive, make it more strict
The parser allowed more possible argument alternatives for command options than the documented one, which limited the possibility of other option names. The patch makes the parser more strict.
Diffstat (limited to 'include')
-rw-r--r--include/libipset/ui.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libipset/ui.h b/include/libipset/ui.h
index aa3979f..78d5866 100644
--- a/include/libipset/ui.h
+++ b/include/libipset/ui.h
@@ -10,11 +10,13 @@
#include <stdbool.h> /* bool */
#include <libipset/linux_ip_set.h> /* enum ipset_cmd */
+#define IPSET_CMD_ALIASES 3
+
/* Commands in userspace */
struct ipset_commands {
enum ipset_cmd cmd;
int has_arg;
- const char *name[2];
+ const char *name[IPSET_CMD_ALIASES];
const char *help;
};