Skip to contentSkip to conversation

ip_nat_ftp doesn't register any ports by default.

PATCH New Rusty Russell 1 participant 1 message Sep 15, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip_nat_ftp doesn't register any ports by default.

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

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

net/ipv4/netfilter/ip_nat_ftp.c +1 -1
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
@@ -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;
Signature · 1 line
Anyone who quotes me in their signature is an idiot -- Rusty Russell