* [PATCH] Bugzilla 482: Allow symbolic port in REDIRECT --to-port
@ 2008-05-25 19:40 Kristof Provost
2008-05-25 22:39 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Kristof Provost @ 2008-05-25 19:40 UTC (permalink / raw)
To: netfilter-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Signed-off-by: Kristof Provost <kristof@sigsegv.be>
- ---
extensions/libipt_REDIRECT.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/extensions/libipt_REDIRECT.c b/extensions/libipt_REDIRECT.c
index b4c73bb..c03562b 100644
- --- 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-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-25 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-25 19:40 [PATCH] Bugzilla 482: Allow symbolic port in REDIRECT --to-port Kristof Provost
2008-05-25 22:39 ` Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.