Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111493
b: refs/heads/master
c: 88ddac5
h: refs/heads/master
i:
  111491: 7858445
v: v3
  • Loading branch information
Gerrit Renker committed Sep 4, 2008
1 parent bbd53fb commit ef3306d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 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: 55ebe3ab2d504bd3f3eeade0262826210019abda
refs/heads/master: 88ddac513a4e7e04234214b600401ec22abfbb46
5 changes: 4 additions & 1 deletion trunk/net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo);
* - DCCP-Reset with ACK Subheader and 4 bytes of Reset Code fields
* Hence a safe upper bound for the maximum option length is 1020-28 = 992
*/
#define MAX_DCCP_SPECIFIC_HEADER (255 * sizeof(int))
#define MAX_DCCP_SPECIFIC_HEADER (255 * sizeof(uint32_t))
#define DCCP_MAX_PACKET_HDR 28
#define DCCP_MAX_OPT_LEN (MAX_DCCP_SPECIFIC_HEADER - DCCP_MAX_PACKET_HDR)
#define MAX_DCCP_HEADER (MAX_DCCP_SPECIFIC_HEADER + MAX_HEADER)

/* Upper bound for initial feature-negotiation overhead (padded to 32 bits) */
#define DCCP_FEATNEG_OVERHEAD (32 * sizeof(uint32_t))

#define DCCP_TIMEWAIT_LEN (60 * HZ) /* how long to wait to destroy TIME-WAIT
* state, about 60 seconds */

Expand Down
15 changes: 14 additions & 1 deletion trunk/net/dccp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,20 @@ void dccp_write_xmit(struct sock *sk, int block)
const int len = skb->len;

if (sk->sk_state == DCCP_PARTOPEN) {
/* See 8.1.5. Handshake Completion */
const u32 cur_mps = dp->dccps_mss_cache - DCCP_FEATNEG_OVERHEAD;
/*
* See 8.1.5 - Handshake Completion.
*
* For robustness we resend Confirm options until the client has
* entered OPEN. During the initial feature negotiation, the MPS
* is smaller than usual, reduced by the Change/Confirm options.
*/
if (!list_empty(&dp->dccps_featneg) && len > cur_mps) {
DCCP_WARN("Payload too large (%d) for featneg.\n", len);
dccp_send_ack(sk);
dccp_feat_list_purge(&dp->dccps_featneg);
}

inet_csk_schedule_ack(sk);
inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
inet_csk(sk)->icsk_rto,
Expand Down

0 comments on commit ef3306d

Please sign in to comment.