* [PATCH] rsh helper handling of ip_conntrack_helper->name
@ 2004-11-11 21:02 Phil Oester
2004-11-11 21:28 ` Martin Josefsson
0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2004-11-11 21:02 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 130 bytes --]
RSH helper doesn't properly handle name registration of multiple ports.
Patch below fixes.
This fixes 1/2 of bugzilla #90
Phil
[-- Attachment #2: patch-rsh --]
[-- Type: text/plain, Size: 1324 bytes --]
diff -ru pom-orig/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c pom-new/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c
--- pom-orig/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c 2003-12-18 10:48:01.000000000 -0800
+++ pom-new/rsh/linux/net/ipv4/netfilter/ip_conntrack_rsh.c 2004-10-28 21:54:47.258745971 -0700
@@ -254,14 +254,14 @@
}
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)
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] rsh helper handling of ip_conntrack_helper->name
2004-11-11 21:02 [PATCH] rsh helper handling of ip_conntrack_helper->name Phil Oester
@ 2004-11-11 21:28 ` Martin Josefsson
0 siblings, 0 replies; 2+ messages in thread
From: Martin Josefsson @ 2004-11-11 21:28 UTC (permalink / raw)
To: Phil Oester; +Cc: Netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
On Thu, 2004-11-11 at 22:02, Phil Oester wrote:
> RSH helper doesn't properly handle name registration of multiple ports.
> Patch below fixes.
>
> This fixes 1/2 of bugzilla #90
Both RSH and RPC patches applied, thanks.
--
/Martin
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-11 21:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-11 21:02 [PATCH] rsh helper handling of ip_conntrack_helper->name Phil Oester
2004-11-11 21:28 ` Martin Josefsson
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.