* [PATCH] REDIRECT does not accept IP
@ 2006-06-20 1:22 Phil Oester
2006-06-20 13:21 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2006-06-20 1:22 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
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
[-- Attachment #2: patch-redirect --]
[-- Type: text/plain, Size: 523 bytes --]
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] REDIRECT does not accept IP
2006-06-20 1:22 [PATCH] REDIRECT does not accept IP Phil Oester
@ 2006-06-20 13:21 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-06-20 13:21 UTC (permalink / raw)
To: Phil Oester; +Cc: netfilter-devel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-20 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 1:22 [PATCH] REDIRECT does not accept IP Phil Oester
2006-06-20 13:21 ` 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.