diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-03-21 14:54:28 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-03-21 14:54:28 +0100 |
commit | aa36f46f2ee5c77db93a6f7df8adbbac21ad605f (patch) | |
tree | 2c029e1eda3597ee9d36802f14a04528b9cd0a38 | |
parent | ad2df1d11fa28a6fee96acebffb970905072a63f (diff) |
only run on eth0 for now
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs index a277104..7880051 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,6 @@ use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use std::os::fd::AsRawFd; use std::str::FromStr; use std::sync::{Arc, Mutex}; -use std::thread; use std::time::Duration; use dhcproto::v4::{DhcpOption, Flags, Message, MessageType, Opcode, OptionCode}; @@ -18,15 +17,7 @@ use dhcproto::{Decodable, Decoder, Encodable, Encoder}; use socket2::{Domain, Socket, Type}; fn main() -> Result<()> { - let mut threads = Vec::new(); - for (i, arg) in std::env::args().skip(1).enumerate() { - threads.push(thread::spawn(move || run(arg, i as u8))); - } - - for handle in threads { - handle.join().unwrap()?; - } - + run("eth0".into(), 0)?; Ok(()) } |