Skip to content

Commit 14934ef

Browse files
committed
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
2 parents 86aa778 + bfbb234 commit 14934ef

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Documentation/networking/dccp.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ rx_ccid = 2
167167
seq_window = 100
168168
The initial sequence window (sec. 7.5.2) of the sender. This influences
169169
the local ackno validity and the remote seqno validity windows (7.5.1).
170+
Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set.
170171

171172
tx_qlen = 5
172173
The size of the transmit buffer in packets. A value of 0 corresponds

net/dccp/dccp.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ static inline void dccp_update_gsr(struct sock *sk, u64 seq)
426426
{
427427
struct dccp_sock *dp = dccp_sk(sk);
428428

429-
dp->dccps_gsr = seq;
429+
if (after48(seq, dp->dccps_gsr))
430+
dp->dccps_gsr = seq;
430431
/* Sequence validity window depends on remote Sequence Window (7.5.1) */
431432
dp->dccps_swl = SUB48(ADD48(dp->dccps_gsr, 1), dp->dccps_r_seq_win / 4);
432433
/*

net/dccp/input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
260260
*/
261261
if (time_before(now, (dp->dccps_rate_last +
262262
sysctl_dccp_sync_ratelimit)))
263-
return 0;
263+
return -1;
264264

265265
DCCP_WARN("Step 6 failed for %s packet, "
266266
"(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and "

net/dccp/sysctl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
/* Boundary values */
2222
static int zero = 0,
2323
u8_max = 0xFF;
24-
static unsigned long seqw_min = 32;
24+
static unsigned long seqw_min = DCCPF_SEQ_WMIN,
25+
seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */
2526

2627
static struct ctl_table dccp_default_table[] = {
2728
{
@@ -31,6 +32,7 @@ static struct ctl_table dccp_default_table[] = {
3132
.mode = 0644,
3233
.proc_handler = proc_doulongvec_minmax,
3334
.extra1 = &seqw_min, /* RFC 4340, 7.5.2 */
35+
.extra2 = &seqw_max,
3436
},
3537
{
3638
.procname = "rx_ccid",

0 commit comments

Comments
 (0)