Netdev List
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: acme@redhat.com
Cc: dccp@vger.kernel.org, netdev@vger.kernel.org,
	Gerrit Renker <gerrit@erg.abdn.ac.uk>
Subject: [PATCH 2/6] [DCCP]: Bug in initial acknowledgment number assignment
Date: Mon, 28 Jan 2008 10:16:12 +0000	[thread overview]
Message-ID: <1201515376-8280-3-git-send-email-gerrit@erg.abdn.ac.uk> (raw)
In-Reply-To: <1201515376-8280-2-git-send-email-gerrit@erg.abdn.ac.uk>

Step 8.5 in RFC 4340 says for the newly cloned socket

           Initialize S.GAR := S.ISS,

but what in fact the code (minisocks.c) does is

           Initialize S.GAR := S.ISR,

which is wrong (typo?) -- fixed by the patch.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 net/dccp/minisocks.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -122,13 +122,12 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
 		 *    Initialize S.GAR := S.ISS
 		 *    Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookies
 		 */
+		newdp->dccps_gar = newdp->dccps_iss = dreq->dreq_iss;
+		dccp_update_gss(newsk, dreq->dreq_iss);
 
-		newdp->dccps_gar = newdp->dccps_isr = dreq->dreq_isr;
+		newdp->dccps_isr = dreq->dreq_isr;
 		dccp_update_gsr(newsk, dreq->dreq_isr);
 
-		newdp->dccps_iss = dreq->dreq_iss;
-		dccp_update_gss(newsk, dreq->dreq_iss);
-
 		/*
 		 * SWL and AWL are initially adjusted so that they are not less than
 		 * the initial Sequence Numbers received and sent, respectively:

  reply	other threads:[~2008-01-28 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 10:16 [DCCP] [Patch 0/6] [BUG-Fix]: Fixes for CCID3, seqnos, and dccp_probe Gerrit Renker
2008-01-28 10:16 ` [PATCH 1/6] [CCID3]: Function returned wrong value Gerrit Renker
2008-01-28 10:16   ` Gerrit Renker [this message]
2008-01-28 10:16     ` [PATCH 3/6] [DCCP]: Bug-Fix - AWL was never updated Gerrit Renker
2008-01-28 10:16       ` [PATCH 4/6] [DCCP]: Fix the adjustments to AWL and SWL Gerrit Renker
2008-01-28 10:16         ` [PATCH 5/6] [DCCP]: Merge now-reduced connect_init() function Gerrit Renker
2008-01-28 10:16           ` [PATCH 6/6] [DCCP-PROBE]: Reduce noise in output and convert to ktime_t Gerrit Renker
2008-01-28 17:59       ` [PATCH 3/6] [DCCP]: Bug-Fix - AWL was never updated Ian McDonald

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=1201515376-8280-3-git-send-email-gerrit@erg.abdn.ac.uk \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=acme@redhat.com \
    --cc=dccp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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