diff options
author | Patrick McHardy <kaber@trash.net> | 2006-01-09 20:48:09 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-10 15:54:35 -0500 |
commit | babbdb1a18d37e57acae7e348ef122f2b905df0a (patch) | |
tree | 51bb7dbffe28ae6f342e0bcc155a54264f30b5e5 /net/netfilter | |
parent | 9d28026b7ec0f3e2a407d5c03fcb37d0b59d1add (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.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_sctp.c | 18 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 20 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_udp.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 24 |
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 | ||
20 | unsigned long nf_ct_generic_timeout = 600*HZ; | 20 | unsigned int nf_ct_generic_timeout = 600*HZ; |
21 | 21 | ||
22 | static int generic_pkt_to_tuple(const struct sk_buff *skb, | 22 | static 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 | ||
65 | static unsigned long nf_ct_sctp_timeout_closed = 10 SECS; | 65 | static unsigned int nf_ct_sctp_timeout_closed = 10 SECS; |
66 | static unsigned long nf_ct_sctp_timeout_cookie_wait = 3 SECS; | 66 | static unsigned int nf_ct_sctp_timeout_cookie_wait = 3 SECS; |
67 | static unsigned long nf_ct_sctp_timeout_cookie_echoed = 3 SECS; | 67 | static unsigned int nf_ct_sctp_timeout_cookie_echoed = 3 SECS; |
68 | static unsigned long nf_ct_sctp_timeout_established = 5 DAYS; | 68 | static unsigned int nf_ct_sctp_timeout_established = 5 DAYS; |
69 | static unsigned long nf_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000; | 69 | static unsigned int nf_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000; |
70 | static unsigned long nf_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000; | 70 | static unsigned int nf_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000; |
71 | static unsigned long nf_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; | 71 | static unsigned int nf_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; |
72 | 72 | ||
73 | static unsigned long * sctp_timeouts[] | 73 | static 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 | ||
96 | unsigned long nf_ct_tcp_timeout_syn_sent = 2 MINS; | 96 | unsigned int nf_ct_tcp_timeout_syn_sent = 2 MINS; |
97 | unsigned long nf_ct_tcp_timeout_syn_recv = 60 SECS; | 97 | unsigned int nf_ct_tcp_timeout_syn_recv = 60 SECS; |
98 | unsigned long nf_ct_tcp_timeout_established = 5 DAYS; | 98 | unsigned int nf_ct_tcp_timeout_established = 5 DAYS; |
99 | unsigned long nf_ct_tcp_timeout_fin_wait = 2 MINS; | 99 | unsigned int nf_ct_tcp_timeout_fin_wait = 2 MINS; |
100 | unsigned long nf_ct_tcp_timeout_close_wait = 60 SECS; | 100 | unsigned int nf_ct_tcp_timeout_close_wait = 60 SECS; |
101 | unsigned long nf_ct_tcp_timeout_last_ack = 30 SECS; | 101 | unsigned int nf_ct_tcp_timeout_last_ack = 30 SECS; |
102 | unsigned long nf_ct_tcp_timeout_time_wait = 2 MINS; | 102 | unsigned int nf_ct_tcp_timeout_time_wait = 2 MINS; |
103 | unsigned long nf_ct_tcp_timeout_close = 10 SECS; | 103 | unsigned 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. */ |
108 | unsigned long nf_ct_tcp_timeout_max_retrans = 5 MINS; | 108 | unsigned int nf_ct_tcp_timeout_max_retrans = 5 MINS; |
109 | 109 | ||
110 | static unsigned long * tcp_timeouts[] | 110 | static 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 | ||
30 | unsigned long nf_ct_udp_timeout = 30*HZ; | 30 | unsigned int nf_ct_udp_timeout = 30*HZ; |
31 | unsigned long nf_ct_udp_timeout_stream = 180*HZ; | 31 | unsigned int nf_ct_udp_timeout_stream = 180*HZ; |
32 | 32 | ||
33 | static int udp_pkt_to_tuple(const struct sk_buff *skb, | 33 | static 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; | |||
431 | extern unsigned int nf_conntrack_htable_size; | 431 | extern unsigned int nf_conntrack_htable_size; |
432 | 432 | ||
433 | /* From nf_conntrack_proto_tcp.c */ | 433 | /* From nf_conntrack_proto_tcp.c */ |
434 | extern unsigned long nf_ct_tcp_timeout_syn_sent; | 434 | extern unsigned int nf_ct_tcp_timeout_syn_sent; |
435 | extern unsigned long nf_ct_tcp_timeout_syn_recv; | 435 | extern unsigned int nf_ct_tcp_timeout_syn_recv; |
436 | extern unsigned long nf_ct_tcp_timeout_established; | 436 | extern unsigned int nf_ct_tcp_timeout_established; |
437 | extern unsigned long nf_ct_tcp_timeout_fin_wait; | 437 | extern unsigned int nf_ct_tcp_timeout_fin_wait; |
438 | extern unsigned long nf_ct_tcp_timeout_close_wait; | 438 | extern unsigned int nf_ct_tcp_timeout_close_wait; |
439 | extern unsigned long nf_ct_tcp_timeout_last_ack; | 439 | extern unsigned int nf_ct_tcp_timeout_last_ack; |
440 | extern unsigned long nf_ct_tcp_timeout_time_wait; | 440 | extern unsigned int nf_ct_tcp_timeout_time_wait; |
441 | extern unsigned long nf_ct_tcp_timeout_close; | 441 | extern unsigned int nf_ct_tcp_timeout_close; |
442 | extern unsigned long nf_ct_tcp_timeout_max_retrans; | 442 | extern unsigned int nf_ct_tcp_timeout_max_retrans; |
443 | extern int nf_ct_tcp_loose; | 443 | extern int nf_ct_tcp_loose; |
444 | extern int nf_ct_tcp_be_liberal; | 444 | extern int nf_ct_tcp_be_liberal; |
445 | extern int nf_ct_tcp_max_retrans; | 445 | extern int nf_ct_tcp_max_retrans; |
446 | 446 | ||
447 | /* From nf_conntrack_proto_udp.c */ | 447 | /* From nf_conntrack_proto_udp.c */ |
448 | extern unsigned long nf_ct_udp_timeout; | 448 | extern unsigned int nf_ct_udp_timeout; |
449 | extern unsigned long nf_ct_udp_timeout_stream; | 449 | extern unsigned int nf_ct_udp_timeout_stream; |
450 | 450 | ||
451 | /* From nf_conntrack_proto_generic.c */ | 451 | /* From nf_conntrack_proto_generic.c */ |
452 | extern unsigned long nf_ct_generic_timeout; | 452 | extern unsigned int nf_ct_generic_timeout; |
453 | 453 | ||
454 | /* Log invalid packets of a given protocol */ | 454 | /* Log invalid packets of a given protocol */ |
455 | static int log_invalid_proto_min = 0; | 455 | static int log_invalid_proto_min = 0; |