]> git.meshlink.io Git - meshlink/blobdiff - src/utcp.c
The maximum unreliable packet size is 65535 bytes.
[meshlink] / src / utcp.c
index dc5a2fcfa59237d2d291ba8e0fc12d1563c98916..c4305cd4de4978d265155f2dcb537cd746e39251 100644 (file)
@@ -1147,7 +1147,7 @@ static void handle_unreliable(struct utcp_connection *c, const struct hdr *hdr,
        }
 
        // Ensure reassembled packet are not larger than 64 kiB
-       if(hdr->wnd >= MAX_UNRELIABLE_SIZE || hdr->wnd + len > MAX_UNRELIABLE_SIZE) {
+       if(hdr->wnd > MAX_UNRELIABLE_SIZE || hdr->wnd + len > MAX_UNRELIABLE_SIZE) {
                return;
        }