diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sync.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c index c99f2a33fb9..0d4d9721cbd 100644 --- a/net/ipv4/ipvs/ip_vs_sync.c +++ b/net/ipv4/ipvs/ip_vs_sync.c | |||
@@ -72,7 +72,6 @@ struct ip_vs_sync_thread_data { | |||
72 | int state; | 72 | int state; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | #define IP_VS_SYNC_CONN_TIMEOUT (3*60*HZ) | ||
76 | #define SIMPLE_CONN_SIZE (sizeof(struct ip_vs_sync_conn)) | 75 | #define SIMPLE_CONN_SIZE (sizeof(struct ip_vs_sync_conn)) |
77 | #define FULL_CONN_SIZE \ | 76 | #define FULL_CONN_SIZE \ |
78 | (sizeof(struct ip_vs_sync_conn) + sizeof(struct ip_vs_sync_conn_options)) | 77 | (sizeof(struct ip_vs_sync_conn) + sizeof(struct ip_vs_sync_conn_options)) |
@@ -284,6 +283,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen) | |||
284 | struct ip_vs_sync_conn *s; | 283 | struct ip_vs_sync_conn *s; |
285 | struct ip_vs_sync_conn_options *opt; | 284 | struct ip_vs_sync_conn_options *opt; |
286 | struct ip_vs_conn *cp; | 285 | struct ip_vs_conn *cp; |
286 | struct ip_vs_protocol *pp; | ||
287 | char *p; | 287 | char *p; |
288 | int i; | 288 | int i; |
289 | 289 | ||
@@ -342,7 +342,8 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen) | |||
342 | p += SIMPLE_CONN_SIZE; | 342 | p += SIMPLE_CONN_SIZE; |
343 | 343 | ||
344 | atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]); | 344 | atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]); |
345 | cp->timeout = IP_VS_SYNC_CONN_TIMEOUT; | 345 | pp = ip_vs_proto_get(s->protocol); |
346 | cp->timeout = pp->timeout_table[cp->state]; | ||
346 | ip_vs_conn_put(cp); | 347 | ip_vs_conn_put(cp); |
347 | 348 | ||
348 | if (p > buffer+buflen) { | 349 | if (p > buffer+buflen) { |