[PATCH] ip_nat_ftp doesn't register any ports by default.

From: Rusty Russell
Date: Wed Sep 15 2004 - 17:27:31 EST


Linus, please apply ASAP. This would be embarrassing: ip_nat_ftp broke
in recent conversion to module_param_array().

Name: Fix ip_nat_ftp registration when no ports= arg
Status: Trivial
Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

FTP NAT module doesn't register anything with no args. Oops.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .6124-linux-2.6.9-rc2-bk2/net/ipv4/netfilter/ip_nat_ftp.c .6124-linux-2.6.9-rc2-bk2.updated/net/ipv4/netfilter/ip_nat_ftp.c
--- .6124-linux-2.6.9-rc2-bk2/net/ipv4/netfilter/ip_nat_ftp.c 2004-09-16 00:17:16.000000000 +1000
+++ .6124-linux-2.6.9-rc2-bk2.updated/net/ipv4/netfilter/ip_nat_ftp.c 2004-09-16 08:05:38.000000000 +1000
@@ -297,7 +297,7 @@ static int __init init(void)
char *tmpname;

if (ports_c == 0)
- ports[ports_c] = FTP_PORT;
+ ports[ports_c++] = FTP_PORT;

for (i = 0; i < ports_c; i++) {
ftp[i].tuple.dst.protonum = IPPROTO_TCP;

--
Anyone who quotes me in their signature is an idiot -- Rusty Russell

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/