summaryrefslogtreecommitdiffstats
path: root/extensions/ebt_redirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ebt_redirect.c')
-rw-r--r--extensions/ebt_redirect.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/extensions/ebt_redirect.c b/extensions/ebt_redirect.c
index ba7f6b1..8630254 100644
--- a/extensions/ebt_redirect.c
+++ b/extensions/ebt_redirect.c
@@ -1,3 +1,11 @@
+/* ebt_redirect
+ *
+ * Authors:
+ * Bart De Schuymer <bdschuym@pandora.be>
+ *
+ * April, 2002
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -38,9 +46,9 @@ static int parse(int c, char **argv, int argc,
switch (c) {
case REDIRECT_TARGET:
- ebt_check_option(flags, OPT_REDIRECT_TARGET);
+ ebt_check_option2(flags, OPT_REDIRECT_TARGET);
if (FILL_TARGET(optarg, redirectinfo->target))
- ebt_print_error("Illegal --redirect-target target");
+ ebt_print_error2("Illegal --redirect-target target");
break;
default:
return 0;
@@ -55,9 +63,10 @@ static void final_check(const struct ebt_u_entry *entry,
struct ebt_redirect_info *redirectinfo =
(struct ebt_redirect_info *)target->data;
- if (BASE_CHAIN && redirectinfo->target == EBT_RETURN)
- ebt_print_error("--redirect-target RETURN not allowed on "
- "base chain");
+ if (BASE_CHAIN && redirectinfo->target == EBT_RETURN) {
+ ebt_print_error("--redirect-target RETURN not allowed on base chain");
+ return;
+ }
CLEAR_BASE_CHAIN_BIT;
if ( ((hookmask & ~(1 << NF_BR_PRE_ROUTING)) || strcmp(name, "nat")) &&
((hookmask & ~(1 << NF_BR_BROUTING)) || strcmp(name, "broute")) )