Remove obsolete scope_id constant

This commit is contained in:
clerie 2024-08-24 14:42:01 +02:00
parent 8f9895bfaa
commit 57e94d576a

View File

@ -19,8 +19,6 @@ use std::{
}; };
use tokio::net::UdpSocket; use tokio::net::UdpSocket;
const scope_id: u32 = 15;
const ALL_DHCP_RELAY_AGENTS_AND_SERVERS: &str = "ff02::1:2"; const ALL_DHCP_RELAY_AGENTS_AND_SERVERS: &str = "ff02::1:2";
const DHCP_CLIENT_PORT: u16 = 546; const DHCP_CLIENT_PORT: u16 = 546;
const DHCP_RELAY_AGENT_AND_SERVER_PORT: u16 = 547; 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 socket_addr = SocketAddrV6::new(selected_address.ip(), DHCP_CLIENT_PORT, 0, selected_interface.index.clone());
let sock = UdpSocket::bind(socket_addr).await.unwrap(); 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 mut msg = Message::new(MessageType::InformationRequest);
let msg_opts = msg.opts_mut(); let msg_opts = msg.opts_mut();