]> git.meshlink.io Git - utcp/commitdiff
Also always send an ACK back when the SYN or FIN bit is set.
authorGuus Sliepen <guus@sliepen.org>
Mon, 7 Oct 2019 10:45:12 +0000 (12:45 +0200)
committerGuus Sliepen <guus@sliepen.org>
Mon, 7 Oct 2019 10:45:12 +0000 (12:45 +0200)
utcp.c

diff --git a/utcp.c b/utcp.c
index d0e56d2c41e6dd278d1791828ff59375fc5b6391..2ed32175dc0f98c9b2bc045f7a62fb43caeb5089 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -1011,7 +1011,7 @@ ssize_t utcp_recv(struct utcp *utcp, const void *data, size_t len) {
                ptr += 2;
        }
 
-       bool has_data = len;
+       bool has_data = len || (hdr.ctl & (SYN | FIN));
 
        // Try to match the packet to an existing connection