aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-01-09 20:48:09 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-10 15:54:35 -0500
commitbabbdb1a18d37e57acae7e348ef122f2b905df0a (patch)
tree51bb7dbffe28ae6f342e0bcc155a54264f30b5e5 /net/netfilter
parent9d28026b7ec0f3e2a407d5c03fcb37d0b59d1add (diff)
[NETFILTER]: Fix timeout sysctls on big-endian 64bit architectures
The connection tracking timeout variables are unsigned long, but proc_dointvec_jiffies is used with sizeof(unsigned int) in the sysctl tables. Since there is no proc_doulongvec_jiffies function, change the timeout variables to unsigned int. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_conntrack_proto_generic.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_sctp.c18
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c20
-rw-r--r--net/netfilter/nf_conntrack_proto_udp.c4
-rw-r--r--net/netfilter/nf_conntrack_standalone.c24
5 files changed, 34 insertions, 34 deletions
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c
index 36425f6c833..46bc27e2756 100644
--- a/net/netfilter/nf_conntrack_proto_generic.c
+++ b/net/netfilter/nf_conntrack_proto_generic.c
@@ -17,7 +17,7 @@
17#include <linux/netfilter.h> 17#include <linux/netfilter.h>
18#include <net/netfilter/nf_conntrack_protocol.h> 18#include <net/netfilter/nf_conntrack_protocol.h>
19 19
20unsigned long nf_ct_generic_timeout = 600*HZ; 20unsigned int nf_ct_generic_timeout = 600*HZ;
21 21
22static int generic_pkt_to_tuple(const struct sk_buff *skb, 22static int generic_pkt_to_tuple(const struct sk_buff *skb,
23 unsigned int dataoff, 23 unsigned int dataoff,
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 3a600f77b4e..cf798e61e37 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -62,15 +62,15 @@ static const char *sctp_conntrack_names[] = {
62#define HOURS * 60 MINS 62#define HOURS * 60 MINS
63#define DAYS * 24 HOURS 63#define DAYS * 24 HOURS
64 64
65static unsigned long nf_ct_sctp_timeout_closed = 10 SECS; 65static unsigned int nf_ct_sctp_timeout_closed = 10 SECS;
66static unsigned long nf_ct_sctp_timeout_cookie_wait = 3 SECS; 66static unsigned int nf_ct_sctp_timeout_cookie_wait = 3 SECS;
67static unsigned long nf_ct_sctp_timeout_cookie_echoed = 3 SECS; 67static unsigned int nf_ct_sctp_timeout_cookie_echoed = 3 SECS;
68static unsigned long nf_ct_sctp_timeout_established = 5 DAYS; 68static unsigned int nf_ct_sctp_timeout_established = 5 DAYS;
69static unsigned long nf_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000; 69static unsigned int nf_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000;
70static unsigned long nf_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000; 70static unsigned int nf_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000;
71static unsigned long nf_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; 71static unsigned int nf_ct_sctp_timeout_shutdown_ack_sent = 3 SECS;
72 72
73static unsigned long * sctp_timeouts[] 73static unsigned int * sctp_timeouts[]
74= { NULL, /* SCTP_CONNTRACK_NONE */ 74= { NULL, /* SCTP_CONNTRACK_NONE */
75 &nf_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */ 75 &nf_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */
76 &nf_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */ 76 &nf_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 9a1348a51a0..df99138c3b3 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -93,21 +93,21 @@ static const char *tcp_conntrack_names[] = {
93#define HOURS * 60 MINS 93#define HOURS * 60 MINS
94#define DAYS * 24 HOURS 94#define DAYS * 24 HOURS
95 95
96unsigned long nf_ct_tcp_timeout_syn_sent = 2 MINS; 96unsigned int nf_ct_tcp_timeout_syn_sent = 2 MINS;
97unsigned long nf_ct_tcp_timeout_syn_recv = 60 SECS; 97unsigned int nf_ct_tcp_timeout_syn_recv = 60 SECS;
98unsigned long nf_ct_tcp_timeout_established = 5 DAYS; 98unsigned int nf_ct_tcp_timeout_established = 5 DAYS;
99unsigned long nf_ct_tcp_timeout_fin_wait = 2 MINS; 99unsigned int nf_ct_tcp_timeout_fin_wait = 2 MINS;
100unsigned long nf_ct_tcp_timeout_close_wait = 60 SECS; 100unsigned int nf_ct_tcp_timeout_close_wait = 60 SECS;
101unsigned long nf_ct_tcp_timeout_last_ack = 30 SECS; 101unsigned int nf_ct_tcp_timeout_last_ack = 30 SECS;
102unsigned long nf_ct_tcp_timeout_time_wait = 2 MINS; 102unsigned int nf_ct_tcp_timeout_time_wait = 2 MINS;
103unsigned long nf_ct_tcp_timeout_close = 10 SECS; 103unsigned int nf_ct_tcp_timeout_close = 10 SECS;
104 104
105/* RFC1122 says the R2 limit should be at least 100 seconds. 105/* RFC1122 says the R2 limit should be at least 100 seconds.
106 Linux uses 15 packets as limit, which corresponds 106 Linux uses 15 packets as limit, which corresponds
107 to ~13-30min depending on RTO. */ 107 to ~13-30min depending on RTO. */
108unsigned long nf_ct_tcp_timeout_max_retrans = 5 MINS; 108unsigned int nf_ct_tcp_timeout_max_retrans = 5 MINS;
109 109
110static unsigned long * tcp_timeouts[] 110static unsigned int * tcp_timeouts[]
111= { NULL, /* TCP_CONNTRACK_NONE */ 111= { NULL, /* TCP_CONNTRACK_NONE */
112 &nf_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */ 112 &nf_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */
113 &nf_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */ 113 &nf_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 1a592a55618..4264dd079a1 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -27,8 +27,8 @@
27#include <linux/netfilter_ipv6.h> 27#include <linux/netfilter_ipv6.h>
28#include <net/netfilter/nf_conntrack_protocol.h> 28#include <net/netfilter/nf_conntrack_protocol.h>
29 29
30unsigned long nf_ct_udp_timeout = 30*HZ; 30unsigned int nf_ct_udp_timeout = 30*HZ;
31unsigned long nf_ct_udp_timeout_stream = 180*HZ; 31unsigned int nf_ct_udp_timeout_stream = 180*HZ;
32 32
33static int udp_pkt_to_tuple(const struct sk_buff *skb, 33static int udp_pkt_to_tuple(const struct sk_buff *skb,
34 unsigned int dataoff, 34 unsigned int dataoff,
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index d17e42b28c7..3531d142f69 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -431,25 +431,25 @@ extern int nf_conntrack_max;
431extern unsigned int nf_conntrack_htable_size; 431extern unsigned int nf_conntrack_htable_size;
432 432
433/* From nf_conntrack_proto_tcp.c */ 433/* From nf_conntrack_proto_tcp.c */
434extern unsigned long nf_ct_tcp_timeout_syn_sent; 434extern unsigned int nf_ct_tcp_timeout_syn_sent;
435extern unsigned long nf_ct_tcp_timeout_syn_recv; 435extern unsigned int nf_ct_tcp_timeout_syn_recv;
436extern unsigned long nf_ct_tcp_timeout_established; 436extern unsigned int nf_ct_tcp_timeout_established;
437extern unsigned long nf_ct_tcp_timeout_fin_wait; 437extern unsigned int nf_ct_tcp_timeout_fin_wait;
438extern unsigned long nf_ct_tcp_timeout_close_wait; 438extern unsigned int nf_ct_tcp_timeout_close_wait;
439extern unsigned long nf_ct_tcp_timeout_last_ack; 439extern unsigned int nf_ct_tcp_timeout_last_ack;
440extern unsigned long nf_ct_tcp_timeout_time_wait; 440extern unsigned int nf_ct_tcp_timeout_time_wait;
441extern unsigned long nf_ct_tcp_timeout_close; 441extern unsigned int nf_ct_tcp_timeout_close;
442extern unsigned long nf_ct_tcp_timeout_max_retrans; 442extern unsigned int nf_ct_tcp_timeout_max_retrans;
443extern int nf_ct_tcp_loose; 443extern int nf_ct_tcp_loose;
444extern int nf_ct_tcp_be_liberal; 444extern int nf_ct_tcp_be_liberal;
445extern int nf_ct_tcp_max_retrans; 445extern int nf_ct_tcp_max_retrans;
446 446
447/* From nf_conntrack_proto_udp.c */ 447/* From nf_conntrack_proto_udp.c */
448extern unsigned long nf_ct_udp_timeout; 448extern unsigned int nf_ct_udp_timeout;
449extern unsigned long nf_ct_udp_timeout_stream; 449extern unsigned int nf_ct_udp_timeout_stream;
450 450
451/* From nf_conntrack_proto_generic.c */ 451/* From nf_conntrack_proto_generic.c */
452extern unsigned long nf_ct_generic_timeout; 452extern unsigned int nf_ct_generic_timeout;
453 453
454/* Log invalid packets of a given protocol */ 454/* Log invalid packets of a given protocol */
455static int log_invalid_proto_min = 0; 455static int log_invalid_proto_min = 0;