Bugzilla 482: Allow symbolic port in REDIRECT --to-port
PATCH 1/1 Bugzilla 482: Allow symbolic port in REDIRECT --to-port
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Signed-off-by Kristof Provost <[email protected]>
- ---
extensions/libipt_REDIRECT.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
extensions/libipt_REDIRECT.c +0 -0
- --- a/extensions/libipt_REDIRECT.c
+++ b/extensions/libipt_REDIRECT.c
@@ -49,6 +49,9 @@ parse_ports(const char *arg, struct ip_nat_multi_range *mr)
exit_error(PARAMETER_PROBLEM, "IP address not permitted\n");
port = atoi(arg);
+ if (port == 0)
+ port = service_to_port(arg, NULL);
+
if (port == 0 || port > 65535)
exit_error(PARAMETER_PROBLEM, "Port `%s' not valid\n", arg);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIOcDAUEZ9DhGwDugRAlRNAJ9pWRB+JNhJtNzCmtoioWeISdScPwCeJiCi b3D0yAzePmT52f37CM88MrA=
=Vph2
-----END PGP SIGNATURE-----
Patrick McHardy
AppliedQuoted 8 lines · Kristof Provost
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Signed-off-by Kristof Provost <[email protected]>- ---
extensions/libipt_REDIRECT.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.