List Info

Thread: REDIRECT does not accept IP




REDIRECT does not accept IP
user name
2006-06-20 01:22:08
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.

Phil


diff -ruN ipt-orig/extensions/libipt_REDIRECT.c
ipt-new/extensions/libipt_REDIRECT.c
--- ipt-orig/extensions/libipt_REDIRECT.c	2005-07-21
23:39:45.000000000 -0700
+++ ipt-new/extensions/libipt_REDIRECT.c	2006-06-19
18:14:37.000000000 -0700
 -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);
REDIRECT does not accept IP
user name
2006-06-20 13:21:14
Phil Oester wrote:
> 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.

Applied, thanks Phil.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )