: ip_nat_tftp: Fix expectation NAT
Subsystems (2)
Hi Dave,
a small patch to fix TFTP SNAT. Please apply to your 2.6.15 tree unless it's already out :)
[NETFILTER]: ip_nat_tftp: Fix expectation NAT
When a TFTP client is SNATed so that the port is also changed, the port is never changed back for the expected connection.
---
commit 8c0bf4aae720eeec4fea59aad4b93258441be231
tree 48a8a73103df0a89bebefdb20a3baacd913b4ecf
parent 67121172f9753f38689651b613a4850e0e75876f
author Marcus Sundberg <[email protected]> Mon, 12 Dec 2005 08:06:56 +0100 committer Patrick McHardy <[email protected]> Mon, 12 Dec 2005 08:06:56 +0100
net/ipv4/netfilter/ip_nat_tftp.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
net/ipv4/netfilter/ip_nat_tftp.c +4 -1
@@ -42,7 +42,10 @@ static unsigned int help(struct sk_buffenum ip_conntrack_info ctinfo, struct ip_conntrack_expect *exp) { - exp->saved_proto.udp.port = exp->tuple.dst.u.tcp.port; + struct ip_conntrack *ct = exp->master; + + exp->saved_proto.udp.port + = ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple.src.u.udp.port; exp->dir =IP_CT_DIR_REPLY ; exp->expectfn = ip_nat_follow_master;if (ip_conntrack_expect_related (exp) !=0 )
David S. Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Mon, 12 Dec 2005 08:32:31 +0100
Quoted 2 lines
a small patch to fix TFTP SNAT. Please apply to your 2.6.15 tree unless it's already out :)
I'll push this off to Linus tomorrow, I already did two pushes of net stuff to him today :)
Thanks.