]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libipt_REDIRECT: "--to-ports" is not mandatory
authorLutz Jaenicke <ljaenicke@innominate.com>
Wed, 18 May 2011 13:11:47 +0000 (15:11 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Wed, 18 May 2011 21:22:54 +0000 (23:22 +0200)
The REDIRECT target can be called without the --to-ports option
being specified. From the manual page:
  ...without this, the destination port is never altered.

Signed-off-by: Lutz Jaenicke <ljaenicke@innominate.com>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libipt_REDIRECT.c

index 426a7463fde06bed860b8ff824fec3dceec17ea3..e67360a051e12588bda7c876bc511e4527cf2d60 100644 (file)
@@ -23,8 +23,7 @@ static void REDIRECT_help(void)
 }
 
 static const struct xt_option_entry REDIRECT_opts[] = {
-       {.name = "to-ports", .id = O_TO_PORTS, .type = XTTYPE_STRING,
-        .flags = XTOPT_MAND},
+       {.name = "to-ports", .id = O_TO_PORTS, .type = XTTYPE_STRING},
        {.name = "random", .id = O_RANDOM, .type = XTTYPE_NONE},
        XTOPT_TABLEEND,
 };