]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dccp: fix return value for sequence-invalid packets
authorSamuel Jero <sj323707@ohio.edu>
Thu, 30 Dec 2010 11:15:16 +0000 (12:15 +0100)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Fri, 7 Jan 2011 11:22:43 +0000 (12:22 +0100)
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>
net/dccp/input.c

index 15af247ea007a9e77f484a21c3cfe10d6796ff16..8cde009e8b8501ead8ff3e94ef6bfbaabc33088c 100644 (file)
@@ -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 "