All of lore.kernel.org
 help / color / mirror / Atom feed
* [NETFILTER 1/2]: nf_conntrack_ftp: don't call NAT helper for unNATed connections
@ 2006-11-04 23:04 Patrick McHardy
  2006-11-04 23:58 ` [NETFILTER 3/*]: nf_conntrack/nf_nat: add TFTP helper port Patrick McHardy
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick McHardy @ 2006-11-04 23:04 UTC (permalink / raw)
  To: Jozsef Kadlecsik; +Cc: Netfilter Development Mailinglist, Yasuyuki Kozakai

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

Small fix to the FTP conntrack helper not to call the NAT
helper for IPv6 (or other unNATed) packets. On top of
the previous patches.



[-- Attachment #2: 01.diff --]
[-- Type: text/plain, Size: 1239 bytes --]

[NETFILTER]: nf_conntrack_ftp: don't call NAT helper for unNATed connections

Since both IPv4 and IPv6 are handled by the connection tracking helper but
only IPv4 supports NAT we must make sure not to call the NAT helper for
unNATed connections.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 49993257192a278f6dc7f288e6ef62059ba88762
tree 8bb4d24ab3b5a0325198c5fa0959d44b0841f9c7
parent aa3104784034fe4a9971de642e962c18b51f5a00
author Patrick McHardy <kaber@trash.net> Sat, 04 Nov 2006 21:29:22 +0100
committer Patrick McHardy <kaber@trash.net> Sat, 04 Nov 2006 21:29:22 +0100

 net/netfilter/nf_conntrack_ftp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index 10836fc..84b3f2a 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -520,7 +520,7 @@ static int help(struct sk_buff **pskb,
 
 	/* Now, NAT might want to mangle the packet, and register the
 	 * (possibly changed) expectation itself. */
-	if (nf_nat_ftp_hook)
+	if (nf_nat_ftp_hook && ct->status & IPS_NAT_MASK)
 		ret = nf_nat_ftp_hook(pskb, ctinfo, search[dir][i].ftptype,
 				      matchoff, matchlen, exp, &seq);
 	else {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-15  5:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-04 23:04 [NETFILTER 1/2]: nf_conntrack_ftp: don't call NAT helper for unNATed connections Patrick McHardy
2006-11-04 23:58 ` [NETFILTER 3/*]: nf_conntrack/nf_nat: add TFTP helper port Patrick McHardy
2006-11-05  0:32   ` [NETFILTER 4/*]: nf_conntrack/nf_nat: add amanda " Patrick McHardy
2006-11-14 19:54     ` [PATCH] nf_conntrack/nf_nat: nf_conntrack_netlink fix Jozsef Kadlecsik
2006-11-15  5:14       ` 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.