]> git.meshlink.io Git - meshlink/commitdiff
Ensure aux field is initialized in RST packets.
authorGuus Sliepen <guus@meshlink.io>
Fri, 23 Apr 2021 15:55:03 +0000 (17:55 +0200)
committerGuus Sliepen <guus@meshlink.io>
Fri, 23 Apr 2021 15:55:03 +0000 (17:55 +0200)
The aux field was left uninitialized. This didn't cause any harm, but
was caught by valgrind.

src/utcp.c

index e3070b890ebedc754a50260c2c5c8169a8b47b89..11a9eead2960ae33a7523280c950da26970b3ef4 100644 (file)
@@ -2109,6 +2109,7 @@ static bool reset_connection(struct utcp_connection *c) {
        hdr.ack = c->rcv.nxt;
        hdr.wnd = 0;
        hdr.ctl = RST;
+       hdr.aux = 0;
 
        print_packet(c, "send", &hdr, sizeof(hdr));
        c->utcp->send(c->utcp, &hdr, sizeof(hdr));