Skip to content

Commit

Permalink
refactor flood
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalston committed Jul 3, 2020
1 parent c9f3bfc commit 7ae8e3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tcp_syn_flood.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ int main()
ip->iph_sourceip.s_addr = rand(); // Use a random IP address
ip->iph_destip.s_addr = inet_addr(DEST_IP);
ip->iph_protocol = IPPROTO_TCP; // The value is 6.
ip->iph_len = htons(sizeof(struct ipheader) +
sizeof(struct tcpheader));
ip->iph_len = htons(sizeof(struct ipheader) + sizeof(struct tcpheader));

// Calculate tcp checksum
tcp->tcp_sum = calculate_tcp_checksum(ip);
Expand Down

0 comments on commit 7ae8e3b

Please sign in to comment.