diff options
author | Harald Welte <laforge@netfilter.org> | 2005-11-17 18:06:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-17 18:06:47 -0500 |
commit | 2fce76afdb067fa3e7f8ee33c9fe366bd65887ea (patch) | |
tree | 1c3c543169d446d495711860250dca4b319343fb /net/ipv4 | |
parent | bd6af700a7191f483f41706467033588f28c8877 (diff) |
[NETFILTER] ip_conntrack: fix ftp/irc/tftp helpers on ports >= 32768
Since we've converted the ftp/irc/tftp helpers to use the new
module_parm_array() some time ago, we ware accidentially using signed data
types - thus preventing those modules from being used on ports >= 32768.
This patch fixes it by using 'ushort' module parameters.
Thanks to Jan Nijs for reporting this bug.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_ftp.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_irc.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_tftp.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c index d77d6b3f5f80..59e12b02b22c 100644 --- a/net/ipv4/netfilter/ip_conntrack_ftp.c +++ b/net/ipv4/netfilter/ip_conntrack_ftp.c | |||
@@ -29,9 +29,9 @@ static char *ftp_buffer; | |||
29 | static DEFINE_SPINLOCK(ip_ftp_lock); | 29 | static DEFINE_SPINLOCK(ip_ftp_lock); |
30 | 30 | ||
31 | #define MAX_PORTS 8 | 31 | #define MAX_PORTS 8 |
32 | static short ports[MAX_PORTS]; | 32 | static unsigned short ports[MAX_PORTS]; |
33 | static int ports_c; | 33 | static int ports_c; |
34 | module_param_array(ports, short, &ports_c, 0400); | 34 | module_param_array(ports, ushort, &ports_c, 0400); |
35 | 35 | ||
36 | static int loose; | 36 | static int loose; |
37 | module_param(loose, int, 0600); | 37 | module_param(loose, int, 0600); |
diff --git a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c index 15457415a4f3..2dea1db14406 100644 --- a/net/ipv4/netfilter/ip_conntrack_irc.c +++ b/net/ipv4/netfilter/ip_conntrack_irc.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
35 | 35 | ||
36 | #define MAX_PORTS 8 | 36 | #define MAX_PORTS 8 |
37 | static short ports[MAX_PORTS]; | 37 | static unsigned short ports[MAX_PORTS]; |
38 | static int ports_c; | 38 | static int ports_c; |
39 | static int max_dcc_channels = 8; | 39 | static int max_dcc_channels = 8; |
40 | static unsigned int dcc_timeout = 300; | 40 | static unsigned int dcc_timeout = 300; |
@@ -52,7 +52,7 @@ EXPORT_SYMBOL_GPL(ip_nat_irc_hook); | |||
52 | MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); | 52 | MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); |
53 | MODULE_DESCRIPTION("IRC (DCC) connection tracking helper"); | 53 | MODULE_DESCRIPTION("IRC (DCC) connection tracking helper"); |
54 | MODULE_LICENSE("GPL"); | 54 | MODULE_LICENSE("GPL"); |
55 | 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"); | 56 | MODULE_PARM_DESC(ports, "port numbers of IRC servers"); |
57 | module_param(max_dcc_channels, int, 0400); | 57 | module_param(max_dcc_channels, int, 0400); |
58 | MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session"); | 58 | MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session"); |
diff --git a/net/ipv4/netfilter/ip_conntrack_tftp.c b/net/ipv4/netfilter/ip_conntrack_tftp.c index a78736b8525d..d3c5a371f993 100644 --- a/net/ipv4/netfilter/ip_conntrack_tftp.c +++ b/net/ipv4/netfilter/ip_conntrack_tftp.c | |||
@@ -26,9 +26,9 @@ MODULE_DESCRIPTION("tftp connection tracking helper"); | |||
26 | MODULE_LICENSE("GPL"); | 26 | MODULE_LICENSE("GPL"); |
27 | 27 | ||
28 | #define MAX_PORTS 8 | 28 | #define MAX_PORTS 8 |
29 | static short ports[MAX_PORTS]; | 29 | static unsigned short ports[MAX_PORTS]; |
30 | static int ports_c; | 30 | static int ports_c; |
31 | module_param_array(ports, short, &ports_c, 0400); | 31 | module_param_array(ports, ushort, &ports_c, 0400); |
32 | MODULE_PARM_DESC(ports, "port numbers of tftp servers"); | 32 | MODULE_PARM_DESC(ports, "port numbers of tftp servers"); |
33 | 33 | ||
34 | #if 0 | 34 | #if 0 |