/[linux-patches]/genpatches-2.6/trunk/2.6.14/1126_3_conntrack-high-ports.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1126_3_conntrack-high-ports.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 9 months ago) by johnm
File MIME type: text/x-diff
File size: 2763 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Tue Nov 15 04:33:08 2005
2 Date: Tue, 15 Nov 2005 13:32:36 +0100
3 From: Harald Welte <laforge@netfilter.org>
4 To: Stable Kernel <stable@kernel.org>
5 Cc:
6 Subject: [PATCH] [NETFILTER] ip_conntrack: fix ftp/irc/tftp helpers on ports >= 32768
7
8 Since we've converted the ftp/irc/tftp helpers to use the new
9 module_parm_array() some time ago, we ware accidentially using signed data
10 types - thus preventing those modules from being used on ports >= 32768.
11
12 This patch fixes it by using 'ushort' module parameters.
13
14 Thanks to Jan Nijs for reporting this bug.
15
16 Signed-off-by: Harald Welte <laforge@netfilter.org>
17 Signed-off-by: Chris Wright <chrisw@osdl.org>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 ---
20 net/ipv4/netfilter/ip_conntrack_ftp.c | 4 ++--
21 net/ipv4/netfilter/ip_conntrack_irc.c | 4 ++--
22 net/ipv4/netfilter/ip_conntrack_tftp.c | 4 ++--
23 3 files changed, 6 insertions(+), 6 deletions(-)
24
25 --- linux-2.6.14.2.orig/net/ipv4/netfilter/ip_conntrack_ftp.c
26 +++ linux-2.6.14.2/net/ipv4/netfilter/ip_conntrack_ftp.c
27 @@ -29,9 +29,9 @@ static char *ftp_buffer;
28 static DEFINE_SPINLOCK(ip_ftp_lock);
29
30 #define MAX_PORTS 8
31 -static short ports[MAX_PORTS];
32 +static unsigned short ports[MAX_PORTS];
33 static int ports_c;
34 -module_param_array(ports, short, &ports_c, 0400);
35 +module_param_array(ports, ushort, &ports_c, 0400);
36
37 static int loose;
38 module_param(loose, int, 0600);
39 --- linux-2.6.14.2.orig/net/ipv4/netfilter/ip_conntrack_irc.c
40 +++ linux-2.6.14.2/net/ipv4/netfilter/ip_conntrack_irc.c
41 @@ -34,7 +34,7 @@
42 #include <linux/moduleparam.h>
43
44 #define MAX_PORTS 8
45 -static short ports[MAX_PORTS];
46 +static unsigned short ports[MAX_PORTS];
47 static int ports_c;
48 static int max_dcc_channels = 8;
49 static unsigned int dcc_timeout = 300;
50 @@ -52,7 +52,7 @@ EXPORT_SYMBOL_GPL(ip_nat_irc_hook);
51 MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
52 MODULE_DESCRIPTION("IRC (DCC) connection tracking helper");
53 MODULE_LICENSE("GPL");
54 -module_param_array(ports, short, &ports_c, 0400);
55 +module_param_array(ports, ushort, &ports_c, 0400);
56 MODULE_PARM_DESC(ports, "port numbers of IRC servers");
57 module_param(max_dcc_channels, int, 0400);
58 MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session");
59 --- linux-2.6.14.2.orig/net/ipv4/netfilter/ip_conntrack_tftp.c
60 +++ linux-2.6.14.2/net/ipv4/netfilter/ip_conntrack_tftp.c
61 @@ -26,9 +26,9 @@ MODULE_DESCRIPTION("tftp connection trac
62 MODULE_LICENSE("GPL");
63
64 #define MAX_PORTS 8
65 -static short ports[MAX_PORTS];
66 +static unsigned short ports[MAX_PORTS];
67 static int ports_c;
68 -module_param_array(ports, short, &ports_c, 0400);
69 +module_param_array(ports, ushort, &ports_c, 0400);
70 MODULE_PARM_DESC(ports, "port numbers of tftp servers");
71
72 #if 0

  ViewVC Help
Powered by ViewVC 1.1.20