netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: davem@davemloft.net
Cc: dccp@vger.kernel.org, netdev@vger.kernel.org,
	Samuel Jero <sj323707@ohio.edu>
Subject: [PATCH 1/3] dccp: fix return value for sequence-invalid packets
Date: Fri,  7 Jan 2011 12:35:28 +0100	[thread overview]
Message-ID: <1294400130-5604-2-git-send-email-gerrit@erg.abdn.ac.uk> (raw)
In-Reply-To: <1294400130-5604-1-git-send-email-gerrit@erg.abdn.ac.uk>

From: Samuel Jero <sj323707@ohio.edu>

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

--- 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)
 		 */
 		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 "

  reply	other threads:[~2011-01-07 11:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0110107112837.GA5315@gerrit.erg.abdn.ac.uk>
2011-01-07 11:35 ` net-next-2.6 [PATCH 0/3] dccp: several sequence-number validation fixes Gerrit Renker
2011-01-07 11:35   ` Gerrit Renker [this message]
2011-01-07 11:35     ` [PATCH 2/3] dccp: fix bug in updating the GSR Gerrit Renker
2011-01-07 11:35       ` [PATCH 3/3] dccp: make upper bound for seq_window consistent on 32/64 bit Gerrit Renker
2011-01-10  0:17   ` net-next-2.6 [PATCH 0/3] dccp: several sequence-number validation fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294400130-5604-2-git-send-email-gerrit@erg.abdn.ac.uk \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=davem@davemloft.net \
    --cc=dccp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sj323707@ohio.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).