[netfilter-cvslog] r3281 -
trunk/patch-o-matic-ng/rsh/linux/net/ipv4/netfilter
gandalf at netfilter.org
gandalf at netfilter.org
Thu Nov 11 22:33:11 CET 2004
Author: gandalf at netfilter.org
Date: 2004-11-11 22:33:11 +0100 (Thu, 11 Nov 2004)
New Revision: 3281
Modified:
trunk/patch-o-matic-ng/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c
Log:
Patch by: Phil Oester <kernel at linuxace.com>
RSH helper doesn't properly handle name registration of multiple ports.
Patch below fixes.
This fixes 1/2 of bugzilla #90
Modified: trunk/patch-o-matic-ng/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c
===================================================================
--- trunk/patch-o-matic-ng/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c 2004-11-11 21:32:21 UTC (rev 3280)
+++ trunk/patch-o-matic-ng/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c 2004-11-11 21:33:11 UTC (rev 3281)
@@ -254,15 +254,15 @@
}
static struct ip_conntrack_helper rsh_helpers[MAX_PORTS];
+static char rsh_names[MAX_PORTS][10];
static void fini(void);
static int __init init(void)
{
int port, ret;
- static char name[10];
+ char *tmpname;
-
/* If no port given, default to standard RSH port */
if (ports[0] == 0)
ports[0] = RSH_PORT;
@@ -270,12 +270,13 @@
for (port = 0; (port < MAX_PORTS) && ports[port]; port++) {
memset(&rsh_helpers[port], 0, sizeof(struct ip_conntrack_helper));
- if (ports[port] == RSH_PORT)
- sprintf(name, "rsh");
- else
- sprintf(name, "rsh-%d", port);
+ tmpname = &rsh_names[port][0];
+ if (ports[port] == RSH_PORT)
+ sprintf(tmpname, "rsh");
+ else
+ sprintf(tmpname, "rsh-%d", ports[port]);
+ rsh_helpers[port].name = tmpname;
- rsh_helpers[port].name = name;
rsh_helpers[port].me = THIS_MODULE;
rsh_helpers[port].max_expected = 1;
rsh_helpers[port].flags = IP_CT_HELPER_F_REUSE_EXPECT;
More information about the netfilter-cvslog
mailing list