Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41639
b: refs/heads/master
c: e11d9d3
h: refs/heads/master
i:
  41637: 7b0f39e
  41635: 01caff5
  41631: e9cf397
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 3, 2006
1 parent 3c61d5c commit eff85fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08a29e41bb6d6516b0f65e19381f537168d1768e
refs/heads/master: e11d9d30802278af22e78d8c10f348b683670cd9
16 changes: 9 additions & 7 deletions trunk/net/dccp/minisocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/dccp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,
skb->dst = dst_clone(dst);

dreq = dccp_rsk(req);
if (inet_rsk(req)->acked) /* increase ISS upon retransmission */
dccp_inc_seqno(&dreq->dreq_iss);
DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_RESPONSE;
DCCP_SKB_CB(skb)->dccpd_seq = dreq->dreq_iss;

Expand All @@ -354,6 +356,8 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,

dccp_csum_outgoing(skb);

/* We use `acked' to remember that a Response was already sent. */
inet_rsk(req)->acked = 1;
DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
return skb;
}
Expand Down

0 comments on commit eff85fc

Please sign in to comment.