diff options
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 8a45be988709..cc1a1859a61b 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -414,8 +414,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
414 | struct inet_connection_sock *icsk = inet_csk(parent); | 414 | struct inet_connection_sock *icsk = inet_csk(parent); |
415 | struct request_sock_queue *queue = &icsk->icsk_accept_queue; | 415 | struct request_sock_queue *queue = &icsk->icsk_accept_queue; |
416 | struct listen_sock *lopt = queue->listen_opt; | 416 | struct listen_sock *lopt = queue->listen_opt; |
417 | int max_retries = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries; | 417 | int thresh = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries; |
418 | int thresh = max_retries; | ||
419 | unsigned long now = jiffies; | 418 | unsigned long now = jiffies; |
420 | struct request_sock **reqp, *req; | 419 | struct request_sock **reqp, *req; |
421 | int i, budget; | 420 | int i, budget; |
@@ -451,9 +450,6 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
451 | } | 450 | } |
452 | } | 451 | } |
453 | 452 | ||
454 | if (queue->rskq_defer_accept) | ||
455 | max_retries = queue->rskq_defer_accept; | ||
456 | |||
457 | budget = 2 * (lopt->nr_table_entries / (timeout / interval)); | 453 | budget = 2 * (lopt->nr_table_entries / (timeout / interval)); |
458 | i = lopt->clock_hand; | 454 | i = lopt->clock_hand; |
459 | 455 | ||
@@ -461,9 +457,8 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
461 | reqp=&lopt->syn_table[i]; | 457 | reqp=&lopt->syn_table[i]; |
462 | while ((req = *reqp) != NULL) { | 458 | while ((req = *reqp) != NULL) { |
463 | if (time_after_eq(now, req->expires)) { | 459 | if (time_after_eq(now, req->expires)) { |
464 | if ((req->retrans < (inet_rsk(req)->acked ? max_retries : thresh)) && | 460 | if (req->retrans < thresh && |
465 | (inet_rsk(req)->acked || | 461 | !req->rsk_ops->rtx_syn_ack(parent, req)) { |
466 | !req->rsk_ops->rtx_syn_ack(parent, req))) { | ||
467 | unsigned long timeo; | 462 | unsigned long timeo; |
468 | 463 | ||
469 | if (req->retrans++ == 0) | 464 | if (req->retrans++ == 0) |