summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-12-20 16:55:06 +0100
committerSander Vrijders <sander@ouroboros.rocks>2021-12-22 16:33:50 +0100
commitb9df537e7180b416659998f9a728abc289706423 (patch)
treeb89373c24ef45a774d2d66e7f740eb2a989f18d2 /src/lib
parent1c28d6844934cdba8b61c022569c3412b3fc8a9b (diff)
downloadouroboros-b9df537e7180b416659998f9a728abc289706423.tar.gz
ouroboros-b9df537e7180b416659998f9a728abc289706423.zip
lib: Set initial sender rwe to sender seqno
The initial sender right window edge (indicating acknowledged packet sequence number) was initialized to seqno - 1. This should be the same as seqno, since we acknowledge with the next expected sequence number. It also indicates that a flow without traffic has no outstanding acknowledgements. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/frct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/frct.c b/src/lib/frct.c
index 5313e4da..af21ed4d 100644
--- a/src/lib/frct.c
+++ b/src/lib/frct.c
@@ -684,7 +684,7 @@ static int __frcti_snd(struct frcti * frcti,
/* There are no unacknowledged packets. */
assert(snd_cr->seqno == snd_cr->lwe);
random_buffer(&snd_cr->seqno, sizeof(snd_cr->seqno));
- snd_cr->lwe = snd_cr->seqno - 1;
+ snd_cr->lwe = snd_cr->seqno;
snd_cr->rwe = snd_cr->lwe + START_WINDOW;
}