From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] rsh helper handling of ip_conntrack_helper->name
Date: Thu, 11 Nov 2004 13:02:58 -0800 [thread overview]
Message-ID: <20041111210258.GB25504@linuxace.com> (raw)
[-- 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;
next reply other threads:[~2004-11-11 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 21:02 Phil Oester [this message]
2004-11-11 21:28 ` [PATCH] rsh helper handling of ip_conntrack_helper->name Martin Josefsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041111210258.GB25504@linuxace.com \
--to=kernel@linuxace.com \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.