]> git.meshlink.io Git - utcp/commitdiff
Make sure all of the packet header is set when retransmitting packets.
authorGuus Sliepen <guus@meshlink.io>
Mon, 19 Oct 2015 18:45:31 +0000 (20:45 +0200)
committerGuus Sliepen <guus@sliepen.org>
Sun, 2 Jul 2017 10:04:19 +0000 (12:04 +0200)
utcp.c

diff --git a/utcp.c b/utcp.c
index 047f70fe795653db1b4abb2ccfb20add21ce6459..5ba4eaade2f585d6ad39a702cadef13c64b01e2a 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -561,13 +561,14 @@ static void retransmit(struct utcp_connection *c) {
 
        pkt->hdr.src = c->src;
        pkt->hdr.dst = c->dst;
+       pkt->hdr.wnd = c->rcv.wnd;
+       pkt->hdr.aux = 0;
 
        switch(c->state) {
                case SYN_SENT:
                        // Send our SYN again
                        pkt->hdr.seq = c->snd.iss;
                        pkt->hdr.ack = 0;
-                       pkt->hdr.wnd = c->rcv.wnd;
                        pkt->hdr.ctl = SYN;
                        print_packet(c->utcp, "rtrx", pkt, sizeof pkt->hdr);
                        utcp->send(utcp, pkt, sizeof pkt->hdr);