diff --git a/src/main.rs b/src/main.rs index 27820f5..dec2812 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,8 +19,6 @@ use std::{ }; use tokio::net::UdpSocket; -const scope_id: u32 = 15; - const ALL_DHCP_RELAY_AGENTS_AND_SERVERS: &str = "ff02::1:2"; const DHCP_CLIENT_PORT: u16 = 546; const DHCP_RELAY_AGENT_AND_SERVER_PORT: u16 = 547; @@ -54,7 +52,7 @@ async fn main() { let socket_addr = SocketAddrV6::new(selected_address.ip(), DHCP_CLIENT_PORT, 0, selected_interface.index.clone()); let sock = UdpSocket::bind(socket_addr).await.unwrap(); - let remote_addr = SocketAddrV6::new(ALL_DHCP_RELAY_AGENTS_AND_SERVERS.parse().unwrap(), DHCP_RELAY_AGENT_AND_SERVER_PORT, 0, scope_id); + let remote_addr = SocketAddrV6::new(ALL_DHCP_RELAY_AGENTS_AND_SERVERS.parse().unwrap(), DHCP_RELAY_AGENT_AND_SERVER_PORT, 0, selected_interface.index.clone()); let mut msg = Message::new(MessageType::InformationRequest); let msg_opts = msg.opts_mut();