[netfilter-cvslog] r6629 - trunk/iptables/extensions

kaber at netfilter.org kaber at netfilter.org
Tue Jun 20 15:45:39 CEST 2006


Author: kaber at netfilter.org
Date: 2006-06-20 15:45:38 +0200 (Tue, 20 Jun 2006)
New Revision: 6629

Modified:
   trunk/iptables/extensions/libipt_REDIRECT.c
Log:
[PATCH] REDIRECT does not accept IP (Phil Oester <kernel at linuxace.com>)

As pointed out by Nicolas Mailhot in bugzilla #483, REDIRECT
does not accept an IP address and when supplied with one,
provides unexpected results.  Patch below fixes this.


Modified: trunk/iptables/extensions/libipt_REDIRECT.c
===================================================================
--- trunk/iptables/extensions/libipt_REDIRECT.c	2006-06-19 16:53:03 UTC (rev 6628)
+++ trunk/iptables/extensions/libipt_REDIRECT.c	2006-06-20 13:45:38 UTC (rev 6629)
@@ -44,6 +44,9 @@
 
 	mr->range[0].flags |= IP_NAT_RANGE_PROTO_SPECIFIED;
 
+	if (strchr(arg, '.'))
+		exit_error(PARAMETER_PROBLEM, "IP address not permitted\n");
+
 	port = atoi(arg);
 	if (port == 0 || port > 65535)
 		exit_error(PARAMETER_PROBLEM, "Port `%s' not valid\n", arg);




More information about the netfilter-cvslog mailing list