[netfilter-cvslog] [iptables] REDIRECT: Allow symbolic port in REDIRECT --to-port
Patrick McHardy
netfilter-cvslog-bounces at lists.netfilter.org
Mon May 26 01:09:17 CEST 2008
Gitweb: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=f04df5a76bc4c9ba06716de5885e0a9b29421938
commit f04df5a76bc4c9ba06716de5885e0a9b29421938
Author: Kristof Provost <kristof at sigsegv.be>
AuthorDate: Mon May 26 00:55:34 2008 +0200
Commit: Patrick McHardy <kaber at trash.net>
CommitDate: Mon May 26 00:55:34 2008 +0200
REDIRECT: Allow symbolic port in REDIRECT --to-port
Fixes Bugzilla 482.
Signed-off-by: Kristof Provost <kristof at sigsegv.be>
via f04df5a76bc4c9ba06716de5885e0a9b29421938 (commit)
from c41860c4dda30c5cb067510e20618906ba840960 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f04df5a76bc4c9ba06716de5885e0a9b29421938
Author: Kristof Provost <kristof at sigsegv.be>
Date: Mon May 26 00:55:34 2008 +0200
REDIRECT: Allow symbolic port in REDIRECT --to-port
Fixes Bugzilla 482.
Signed-off-by: Kristof Provost <kristof at sigsegv.be>
-----------------------------------------------------------------------
extensions/libipt_REDIRECT.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Fixes Bugzilla 482.
Signed-off-by: Kristof Provost <kristof at sigsegv.be>
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);
More information about the netfilter-cvslog
mailing list