]> git.meshlink.io Git - utcp/blobdiff - utcp.c
Reset the snd.nxt pointer when starting packet retransmission.
[utcp] / utcp.c
diff --git a/utcp.c b/utcp.c
index e347bb7165209b284409c6f92fca724993c05c04..7624aa576d39c8753c810cea4c4f8643c377d3d4 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -500,6 +500,7 @@ static void retransmit(struct utcp_connection *c) {
                                len--;
                                pkt->hdr.ctl |= FIN;
                        }
+                       c->snd.nxt = c->snd.una + len;
                        buffer_copy(&c->sndbuf, pkt->data, 0, len);
                        print_packet(c->utcp, "rtrx", pkt, sizeof pkt->hdr + len);
                        utcp->send(utcp, pkt, sizeof pkt->hdr + len);