diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-09 19:16:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-09 19:16:57 -0500 |
commit | 14934efab62201c176c620bd598b34b59acb6796 (patch) | |
tree | 4262474eb8dc55decb9b88c3a42d1aaed74b4074 /net | |
parent | 86aa77854f47ab6f5f9c687507af1f57d2b89004 (diff) | |
parent | bfbb23466adcbc77facea3046b44f75530079472 (diff) |
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/dccp.h | 3 | ||||
-rw-r--r-- | net/dccp/input.c | 2 | ||||
-rw-r--r-- | net/dccp/sysctl.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 45087052d894..5fdb07229017 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -426,7 +426,8 @@ static inline void dccp_update_gsr(struct sock *sk, u64 seq) | |||
426 | { | 426 | { |
427 | struct dccp_sock *dp = dccp_sk(sk); | 427 | struct dccp_sock *dp = dccp_sk(sk); |
428 | 428 | ||
429 | dp->dccps_gsr = seq; | 429 | if (after48(seq, dp->dccps_gsr)) |
430 | dp->dccps_gsr = seq; | ||
430 | /* Sequence validity window depends on remote Sequence Window (7.5.1) */ | 431 | /* Sequence validity window depends on remote Sequence Window (7.5.1) */ |
431 | dp->dccps_swl = SUB48(ADD48(dp->dccps_gsr, 1), dp->dccps_r_seq_win / 4); | 432 | dp->dccps_swl = SUB48(ADD48(dp->dccps_gsr, 1), dp->dccps_r_seq_win / 4); |
432 | /* | 433 | /* |
diff --git a/net/dccp/input.c b/net/dccp/input.c index 15af247ea007..8cde009e8b85 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -260,7 +260,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb) | |||
260 | */ | 260 | */ |
261 | if (time_before(now, (dp->dccps_rate_last + | 261 | if (time_before(now, (dp->dccps_rate_last + |
262 | sysctl_dccp_sync_ratelimit))) | 262 | sysctl_dccp_sync_ratelimit))) |
263 | return 0; | 263 | return -1; |
264 | 264 | ||
265 | DCCP_WARN("Step 6 failed for %s packet, " | 265 | DCCP_WARN("Step 6 failed for %s packet, " |
266 | "(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and " | 266 | "(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and " |
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index 563943822e58..42348824ee31 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
@@ -21,7 +21,8 @@ | |||
21 | /* Boundary values */ | 21 | /* Boundary values */ |
22 | static int zero = 0, | 22 | static int zero = 0, |
23 | u8_max = 0xFF; | 23 | 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 */ | ||
25 | 26 | ||
26 | static struct ctl_table dccp_default_table[] = { | 27 | static struct ctl_table dccp_default_table[] = { |
27 | { | 28 | { |
@@ -31,6 +32,7 @@ static struct ctl_table dccp_default_table[] = { | |||
31 | .mode = 0644, | 32 | .mode = 0644, |
32 | .proc_handler = proc_doulongvec_minmax, | 33 | .proc_handler = proc_doulongvec_minmax, |
33 | .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */ | 34 | .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */ |
35 | .extra2 = &seqw_max, | ||
34 | }, | 36 | }, |
35 | { | 37 | { |
36 | .procname = "rx_ccid", | 38 | .procname = "rx_ccid", |