Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41615
b: refs/heads/master
c: 60361be
h: refs/heads/master
i:
  41613: b51265e
  41611: d3c6e5b
  41607: eec403f
  41599: 6da8a00
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 3, 2006
1 parent e36ccbb commit 30bf8f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: 931731123a103cfb3f70ac4b7abfc71d94ba1f03
refs/heads/master: 60361be1be7854cbffb6dc268d1bc094da33431c
18 changes: 12 additions & 6 deletions trunk/net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ extern void dccp_tw_deschedule(struct inet_timewait_sock *tw);

extern void dccp_time_wait(struct sock *sk, int state, int timeo);

/* FIXME: Right size this */
#define DCCP_MAX_OPT_LEN 128

#define DCCP_MAX_PACKET_HDR 32

#define MAX_DCCP_HEADER (DCCP_MAX_PACKET_HDR + DCCP_MAX_OPT_LEN + MAX_HEADER)
/*
* Set safe upper bounds for header and option length. Since Data Offset is 8
* bits (RFC 4340, sec. 5.1), the total header length can never be more than
* 4 * 255 = 1020 bytes. The largest possible header length is 28 bytes (X=1):
* - DCCP-Response with ACK Subheader and 4 bytes of Service code OR
* - 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 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)

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

0 comments on commit 30bf8f9

Please sign in to comment.