summaryrefslogtreecommitdiff
path: root/net/dccp/minisocks.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-11-13 13:12:07 -0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:22:17 -0800
commite11d9d30802278af22e78d8c10f348b683670cd9 (patch)
treeba084b0c5791090164363ad2aaec2c0ab241f603 /net/dccp/minisocks.c
parent08a29e41bb6d6516b0f65e19381f537168d1768e (diff)
downloadlwn-e11d9d30802278af22e78d8c10f348b683670cd9.tar.gz
lwn-e11d9d30802278af22e78d8c10f348b683670cd9.zip
[DCCP]: Increment sequence numbers on retransmitted Response packets
Problem:
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r--net/dccp/minisocks.c16
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,
/* Check for retransmitted REQUEST */
if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) {
- if (after48(DCCP_SKB_CB(skb)->dccpd_seq,
- dccp_rsk(req)->dreq_isr)) {
- struct dccp_request_sock *dreq = dccp_rsk(req);
+ struct dccp_request_sock *dreq = dccp_rsk(req);
+ if (after48(DCCP_SKB_CB(skb)->dccpd_seq, dreq->dreq_isr)) {
dccp_pr_debug("Retransmitted REQUEST\n");
- /* Send another RESPONSE packet */
- dccp_set_seqno(&dreq->dreq_iss, dreq->dreq_iss + 1);
- dccp_set_seqno(&dreq->dreq_isr,
- DCCP_SKB_CB(skb)->dccpd_seq);
+ dreq->dreq_isr = DCCP_SKB_CB(skb)->dccpd_seq;
+ /*
+ * Send another RESPONSE packet
+ * To protect against Request floods, increment retrans
+ * counter (backoff, monitored by dccp_response_timer).
+ */
+ req->retrans++;
req->rsk_ops->rtx_syn_ack(sk, req, NULL);
}
/* Network Duplicate, discard packet */