From 10cde520c9d99af50b96f813dc8f3b5390675c7c Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 14 May 2019 14:48:40 +0200 Subject: [PATCH] Fix bug and RTT abbr --- README.md | 2 +- src/packet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8735863..c6cf2d8 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Now your machine is ready and you will be able to use the following commads: * `donar` is our main binary. It can be run as a client or a server. * `udpecho` is a simple udp server that send back the data sent to him. * `torecho` is a simple tcp server that send back the data sent to him + configure the tor daemon to generate a hidden service URL and be accessible on the Tor network. - * `measlat` can be used in conjunction with `udpecho` or `torecho` to measure a Rount Time Trip (RTT) + * `measlat` can be used in conjunction with `udpecho` or `torecho` to measure a Round Trip Time (RTT) Try to run the previous commands in your terminal without any option, you will see their help. diff --git a/src/packet.c b/src/packet.c index 518cb53..a779984 100644 --- a/src/packet.c +++ b/src/packet.c @@ -56,7 +56,7 @@ enum FD_STATE write_packet_to_tcp(int fd, struct buffer_packet* bp) { enum FD_STATE write_packet_to_udp(int fd, struct buffer_packet* bp, struct udp_target* udp_t) { ssize_t nwrite; size_t bytes_to_send; - assert(bp->ip.ap.headers.cmd == CMD_CLEAR); + assert(bp->ip.ap.fmt.headers.cmd == CMD_CLEAR); size_t pkt_header_size = sizeof(bp->ip.ap.fmt.headers) + sizeof(bp->ip.ap.fmt.content.clear) - sizeof(char); struct sockaddr* addr = NULL; socklen_t addrlen = 0;