2003-07-17 21:01:02

by Harald Welte

[permalink] [raw]
Subject: [PATCH] fix ip_nat_ftp in 2.6.0-test1

Hi DaveM!

This is a 2.6 only fix for the FTP NAT helper code. The patch below
(by Martin Josefsson) also closes Bug 933 in the kernel bug tracker.

The bug was introduced while making the helper compliant to the recently
introduced support for nonlinear skb's in netfilter.

Thanks!

--- linux-2.5.75/net/ipv4/netfilter/ip_nat_helper.c.orig 2003-07-17 19:27:53.000000000 +0200
+++ linux-2.5.75/net/ipv4/netfilter/ip_nat_helper.c 2003-07-17 19:30:29.000000000 +0200
@@ -191,7 +191,7 @@
csum_partial((char *)tcph, tcph->doff*4,
(*pskb)->csum));
adjust_tcp_sequence(ntohl(tcph->seq),
- (int)match_len - (int)rep_len,
+ (int)rep_len - (int)match_len,
ct, ctinfo);
return 1;
}

--
- Harald Welte <[email protected]> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie


Attachments:
(No filename) (1.05 kB)
(No filename) (189.00 B)
Download all attachments

2003-07-17 21:41:45

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] fix ip_nat_ftp in 2.6.0-test1

On Thu, 17 Jul 2003 23:12:54 +0200
Harald Welte <[email protected]> wrote:

> This is a 2.6 only fix for the FTP NAT helper code. The patch below
> (by Martin Josefsson) also closes Bug 933 in the kernel bug tracker.
>
> The bug was introduced while making the helper compliant to the recently
> introduced support for nonlinear skb's in netfilter.

Applied, thanks Harald.