mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-26 08:02:47 +00:00
Native FIN hack
This commit is contained in:
parent
7a41f35e74
commit
b71e675e82
1 changed files with 8 additions and 0 deletions
|
@ -939,6 +939,14 @@ void handle_tcp(JNIEnv *env, jobject instance, const struct arguments *args,
|
|||
cur->remote_seq - cur->remote_start,
|
||||
ntohl(tcphdr->ack_seq) - cur->local_start,
|
||||
cur->local_seq - cur->local_start);
|
||||
// TODO hack
|
||||
if (cur->state == TCP_FIN_WAIT1) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, TAG, "FIN hack");
|
||||
if (writeTCP(cur, NULL, 0, 1, 0, 0, 0, args->tun) < 0) // ACK
|
||||
__android_log_print(ANDROID_LOG_ERROR, TAG,
|
||||
"write ACK error %d: %s",
|
||||
errno, strerror((errno)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue