diff --git a/src/tcp.c b/src/tcp.c index 74c818e..1322ef1 100644 --- a/src/tcp.c +++ b/src/tcp.c @@ -312,8 +312,8 @@ int tcp_ipv4(struct s_ethernet *eth4, struct s_ipv4 *ip4, char *payload, /* if this is the last fragment, remove the entry from table */ if (!(ip4->flags_offset & htons(IPV4_FLAG_MORE_FRAGMENTS))) { printf("[Debug] Removing fragment entry\n"); - nat_in_fragments_clenup(nat4_tcp_fragments, - ip4->ip_src, ip4->id); + nat_in_fragments_cleanup(nat4_tcp_fragments, + ip4->ip_src, ip4->id); } } diff --git a/src/wrapper.c b/src/wrapper.c index 4c73362..28742c0 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -37,7 +37,7 @@ #include "transmitter.h" #include "wrapper.h" --/* +++ CONFIGURATION +++ */ +/* +++ CONFIGURATION +++ */ #define INTERFACE "eth0" /* be sure to turn off generic-segmentation-offload! */ #define PREFIX "64:ff9b::" #define IPV4_ADDR "192.168.0.111" @@ -61,7 +61,7 @@ int main(int argc, char **argv) int sniff_sock; int length; - char buffer[BUFFER_SIZE]; + char buffer[MTU]; /* initialize the socket for sniffing */ if ((sniff_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) == -1) { @@ -124,7 +124,7 @@ int main(int argc, char **argv) /* sniff! :c) */ for (;;) { addr_size = sizeof(addr); - if ((length = recv(sniff_sock, buffer, BUFFER_SIZE, 0)) == -1) { + if ((length = recv(sniff_sock, buffer, MTU, 0)) == -1) { fprintf(stderr, "[Error] Unable to retrieve data from socket\n"); return 1; }