Native radomize local sequence

This commit is contained in:
M66B 2016-01-15 10:08:18 +01:00
parent f884f06a84
commit ab9ecde817
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#include <android/log.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <pthread.h>
@ -493,7 +494,7 @@ void handle_tcp(JNIEnv *env, jobject instance, const struct arguments *args,
struct connection *syn = malloc(sizeof(struct connection)); // TODO check/free
syn->time = time(NULL);
syn->remote_seq = ntohl(tcphdr->seq); // ISN remote
syn->local_seq = 123; // ISN local TODO randomize
syn->local_seq = rand(); // ISN local
syn->saddr = iphdr->saddr;
syn->source = tcphdr->source;
syn->daddr = iphdr->daddr;