From 741da619e16aa120fd2e5df5f739f3db25c02fc8 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 7 Feb 2016 18:49:00 +0100 Subject: [PATCH] Check remote sequence only for ACK Fixes #299 --- app/src/main/jni/netguard/netguard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/jni/netguard/netguard.c b/app/src/main/jni/netguard/netguard.c index cfc81651..e9cd4416 100644 --- a/app/src/main/jni/netguard/netguard.c +++ b/app/src/main/jni/netguard/netguard.c @@ -2437,7 +2437,7 @@ jboolean handle_tcp(const struct arguments *args, return 0; } else { - if (ntohl(tcphdr->ack_seq) == cur->local_seq) { + if (!tcphdr->ack || ntohl(tcphdr->ack_seq) == cur->local_seq) { if (tcphdr->syn) { log_android(ANDROID_LOG_WARN, "%s repeated SYN", session); // The socket is likely not opened yet