summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_REDIRECT.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_REDIRECT.c')
-rw-r--r--extensions/libipt_REDIRECT.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/libipt_REDIRECT.c b/extensions/libipt_REDIRECT.c
index 324d0ebf..940603a9 100644
--- a/extensions/libipt_REDIRECT.c
+++ b/extensions/libipt_REDIRECT.c
@@ -1,4 +1,5 @@
/* Shared library add-on to iptables to add redirect support. */
+#include <stdbool.h>
#include <stdio.h>
#include <netdb.h>
#include <string.h>
@@ -22,9 +23,9 @@ static void REDIRECT_help(void)
}
static const struct option REDIRECT_opts[] = {
- { "to-ports", 1, NULL, '1' },
- { "random", 0, NULL, '2' },
- { .name = NULL }
+ {.name = "to-ports", .has_arg = true, .val = '1'},
+ {.name = "random", .has_arg = false, .val = '2'},
+ XT_GETOPT_TABLEEND,
};
static void REDIRECT_init(struct xt_entry_target *t)