Skip to content

Commit 2cf5be9

Browse files
samueljeroGerrit Renker
authored andcommitted
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 <[email protected]> Acked-by: Gerrit Renker <[email protected]>
1 parent 4e3dbdb commit 2cf5be9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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 "

0 commit comments

Comments
 (0)