Jozsef Kadlecsik f9dd09c7f7 netfilter: nf_nat: fix NAT issue in 2.6.30.4+
Vitezslav Samel discovered that since 2.6.30.4+ active FTP can not work
over NAT. The "cause" of the problem was a fix of unacknowledged data
detection with NAT (commit a3a9f79e361e864f0e9d75ebe2a0cb43d17c4272).
However, actually, that fix uncovered a long standing bug in TCP conntrack:
when NAT was enabled, we simply updated the max of the right edge of
the segments we have seen (td_end), by the offset NAT produced with
changing IP/port in the data. However, we did not update the other parameter
(td_maxend) which is affected by the NAT offset. Thus that could drift
away from the correct value and thus resulted breaking active FTP.

The patch below fixes the issue by *not* updating the conntrack parameters
from NAT, but instead taking into account the NAT offsets in conntrack in a
consistent way. (Updating from NAT would be more harder and expensive because
it'd need to re-calculate parameters we already calculated in conntrack.)

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-06 00:43:42 -08:00
..
2009-09-14 17:03:01 -07:00
2009-09-01 17:40:57 -07:00
2008-07-16 20:20:11 -07:00
2009-10-07 03:18:17 -07:00
2009-09-14 17:03:01 -07:00
2009-08-28 23:57:15 -07:00
2009-09-14 17:03:01 -07:00
2009-06-03 02:51:04 -07:00
2009-09-14 17:03:01 -07:00
2009-06-03 02:51:04 -07:00
2009-10-19 21:34:20 -07:00
2009-09-14 17:03:01 -07:00
2009-09-24 15:39:22 -07:00
2009-06-13 23:36:32 -07:00
2008-10-07 08:38:24 +11:00
2009-06-03 02:51:04 -07:00
2009-04-27 02:45:02 -07:00
2009-09-14 17:03:01 -07:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:14 -08:00
2009-09-15 01:30:10 -07:00
2009-09-15 01:30:10 -07:00
2009-03-13 16:05:14 -07:00
2009-05-25 22:44:59 -07:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:15 -08:00
2009-09-14 17:03:01 -07:00
2009-10-30 12:25:12 -07:00
2009-09-14 17:03:01 -07:00
2009-06-03 02:51:04 -07:00
2009-06-03 02:51:04 -07:00
2009-06-03 02:51:04 -07:00