Skip to content

Commit

Permalink
disable random src addr
Browse files Browse the repository at this point in the history
  • Loading branch information
vvh413 committed Jun 25, 2023
1 parent 613895e commit bc92f7e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/flooder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ use std::time::Duration;
use pnet::packet::ip::IpNextHeaderProtocol;
use pnet::packet::ipv4::MutableIpv4Packet;
use pnet::transport::TransportSender;
use rand::Rng;
// use rand::Rng;

pub const IPV4_HEADER_LEN: usize = 21;
const TTL: u8 = 64;

fn rand_ipv4() -> Ipv4Addr {
let buf: [u8; 4] = rand::thread_rng().gen();
Ipv4Addr::from(buf)
}
// fn rand_ipv4() -> Ipv4Addr {
// let buf: [u8; 4] = rand::thread_rng().gen();
// Ipv4Addr::from(buf)
// }

fn create_ipv4_packet(
buffer_ip: &mut [u8],
Expand Down

0 comments on commit bc92f7e

Please sign in to comment.