Skip to content

Commit

Permalink
dccp: fix return value for sequence-invalid packets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Jero authored and Gerrit Renker committed Jan 7, 2011
1 parent 4e3dbdb commit 2cf5be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dccp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
*/
if (time_before(now, (dp->dccps_rate_last +
sysctl_dccp_sync_ratelimit)))
return 0;
return -1;

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

0 comments on commit 2cf5be9

Please sign in to comment.