diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2005-02-08 20:02:28 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2005-02-08 20:02:28 +0000 |
commit | 6731d6eb86c5fbdb1ffdd1d167162594c8b8beb7 (patch) | |
tree | 85a8acf3b6f19d0ac71b1e7d8b17225f609f3a7c /userspace/ebtables2/extensions/ebt_redirect.c | |
parent | bb1e6769f539ac3fcb3a44a6591c9ff6a5cb534e (diff) |
general cleanup + add -C and -c
Diffstat (limited to 'userspace/ebtables2/extensions/ebt_redirect.c')
-rw-r--r-- | userspace/ebtables2/extensions/ebt_redirect.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/userspace/ebtables2/extensions/ebt_redirect.c b/userspace/ebtables2/extensions/ebt_redirect.c index ba7f6b1..8630254 100644 --- a/userspace/ebtables2/extensions/ebt_redirect.c +++ b/userspace/ebtables2/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")) ) |