Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6297
b: refs/heads/master
c: 2669d63
h: refs/heads/master
i:
  6295: 26257db
v: v3
  • Loading branch information
Harald Welte authored and David S. Miller committed Aug 29, 2005
1 parent 7e812c6 commit 5da83ac
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb97d31f5130d677644d9931ef38613d1164ec94
refs/heads/master: 2669d63d20683828f673b606915957f3a070602d
18 changes: 16 additions & 2 deletions trunk/net/ipv4/netfilter/ip_conntrack_amanda.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ MODULE_PARM_DESC(master_timeout, "timeout for the master connection");
static char *conns[] = { "DATA ", "MESG ", "INDEX " };

/* This is slow, but it's simple. --RR */
static char amanda_buffer[65536];
static char *amanda_buffer;
static DEFINE_SPINLOCK(amanda_buffer_lock);

unsigned int (*ip_nat_amanda_hook)(struct sk_buff **pskb,
Expand Down Expand Up @@ -153,11 +153,25 @@ static struct ip_conntrack_helper amanda_helper = {
static void __exit fini(void)
{
ip_conntrack_helper_unregister(&amanda_helper);
kfree(amanda_buffer);
}

static int __init init(void)
{
return ip_conntrack_helper_register(&amanda_helper);
int ret;

amanda_buffer = kmalloc(65536, GFP_KERNEL);
if (!amanda_buffer)
return -ENOMEM;

ret = ip_conntrack_helper_register(&amanda_helper);
if (ret < 0) {
kfree(amanda_buffer);
return ret;
}
return 0;


}

module_init(init);
Expand Down
9 changes: 7 additions & 2 deletions trunk/net/ipv4/netfilter/ip_conntrack_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ MODULE_AUTHOR("Rusty Russell <rusty@rustcorp.com.au>");
MODULE_DESCRIPTION("ftp connection tracking helper");

/* This is slow, but it's simple. --RR */
static char ftp_buffer[65536];

static char *ftp_buffer;
static DEFINE_SPINLOCK(ip_ftp_lock);

#define MAX_PORTS 8
Expand Down Expand Up @@ -461,13 +460,19 @@ static void fini(void)
ports[i]);
ip_conntrack_helper_unregister(&ftp[i]);
}

kfree(ftp_buffer);
}

static int __init init(void)
{
int i, ret;
char *tmpname;

ftp_buffer = kmalloc(65536, GFP_KERNEL);
if (!ftp_buffer)
return -ENOMEM;

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

Expand Down
7 changes: 6 additions & 1 deletion trunk/net/ipv4/netfilter/ip_conntrack_irc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static int ports_c;
static int max_dcc_channels = 8;
static unsigned int dcc_timeout = 300;
/* This is slow, but it's simple. --RR */
static char irc_buffer[65536];
static char *irc_buffer;
static DEFINE_SPINLOCK(irc_buffer_lock);

unsigned int (*ip_nat_irc_hook)(struct sk_buff **pskb,
Expand Down Expand Up @@ -257,6 +257,10 @@ static int __init init(void)
printk("ip_conntrack_irc: dcc_timeout must be a positive integer\n");
return -EBUSY;
}

irc_buffer = kmalloc(65536, GFP_KERNEL);
if (!irc_buffer)
return -ENOMEM;

/* If no port given, default to standard irc port */
if (ports_c == 0)
Expand Down Expand Up @@ -304,6 +308,7 @@ static void fini(void)
ports[i]);
ip_conntrack_helper_unregister(&irc_helpers[i]);
}
kfree(irc_buffer);
}

module_init(init);
Expand Down

0 comments on commit 5da83ac

Please sign in to comment.