From 57e94d576a86e774d41fdf702ec69c2f6af74cf4 Mon Sep 17 00:00:00 2001 From: clerie Date: Sat, 24 Aug 2024 14:42:01 +0200 Subject: [PATCH] Remove obsolete scope_id constant --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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();