diff options
author | Samuel Jero <sj323707@ohio.edu> | 2010-12-30 06:15:16 -0500 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2011-01-07 06:22:43 -0500 |
commit | 2cf5be93d1b704f342ad423a49f0e78d73939e66 (patch) | |
tree | 5d0e0435c71e775134d0e2374c97db78a46d3198 /net/dccp | |
parent | 4e3dbdb1392a83bd21a6ff8f6bc785495058d37c (diff) |
dccp: fix return value for sequence-invalid packets
Currently dccp_check_seqno returns 0 (indicating a valid packet) if the
acknowledgment number is out of bounds and the sync that RFC 4340 mandates at
this point is currently being rate-limited. This function should return -1,
indicating an invalid packet.
Signed-off-by: Samuel Jero <sj323707@ohio.edu>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/input.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 " |