diff options
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r-- | net/dccp/minisocks.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index d3de696fe4bf..5b2773efd7c7 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -196,15 +196,17 @@ struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | |||
196 | 196 | ||
197 | /* Check for retransmitted REQUEST */ | 197 | /* Check for retransmitted REQUEST */ |
198 | if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) { | 198 | if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) { |
199 | if (after48(DCCP_SKB_CB(skb)->dccpd_seq, | 199 | struct dccp_request_sock *dreq = dccp_rsk(req); |
200 | dccp_rsk(req)->dreq_isr)) { | ||
201 | struct dccp_request_sock *dreq = dccp_rsk(req); | ||
202 | 200 | ||
201 | if (after48(DCCP_SKB_CB(skb)->dccpd_seq, dreq->dreq_isr)) { | ||
203 | dccp_pr_debug("Retransmitted REQUEST\n"); | 202 | dccp_pr_debug("Retransmitted REQUEST\n"); |
204 | /* Send another RESPONSE packet */ | 203 | dreq->dreq_isr = DCCP_SKB_CB(skb)->dccpd_seq; |
205 | dccp_set_seqno(&dreq->dreq_iss, dreq->dreq_iss + 1); | 204 | /* |
206 | dccp_set_seqno(&dreq->dreq_isr, | 205 | * Send another RESPONSE packet |
207 | DCCP_SKB_CB(skb)->dccpd_seq); | 206 | * To protect against Request floods, increment retrans |
207 | * counter (backoff, monitored by dccp_response_timer). | ||
208 | */ | ||
209 | req->retrans++; | ||
208 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); | 210 | req->rsk_ops->rtx_syn_ack(sk, req, NULL); |
209 | } | 211 | } |
210 | /* Network Duplicate, discard packet */ | 212 | /* Network Duplicate, discard packet */ |