From 406c265a6741a9c8240ff462b20012ea13c2ec89 Mon Sep 17 00:00:00 2001 From: Jonas <92295347+jpx40@users.noreply.github.com> Date: Sun, 25 Feb 2024 20:17:30 +0100 Subject: [PATCH] update --- central/rsrem/Cargo.lock | 7 +++++++ central/rsrem/Cargo.toml | 1 + central/rsrem/src/main.rs | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/central/rsrem/Cargo.lock b/central/rsrem/Cargo.lock index 6e5284a..63e3567 100644 --- a/central/rsrem/Cargo.lock +++ b/central/rsrem/Cargo.lock @@ -1762,6 +1762,7 @@ dependencies = [ "ssh2", "time", "toml", + "uninit", ] [[package]] @@ -2258,6 +2259,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "uninit" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "359fdaaabedff944f100847f2e0ea88918d8012fe64baf5b54c191ad010168c9" + [[package]] name = "universal-hash" version = "0.5.1" diff --git a/central/rsrem/Cargo.toml b/central/rsrem/Cargo.toml index 77e2ff7..ba07fea 100644 --- a/central/rsrem/Cargo.toml +++ b/central/rsrem/Cargo.toml @@ -28,3 +28,4 @@ smol = "2.0.0" ssh2 = { version = "0.9.4", features = ["vendored-openssl"] } time = "0.3.34" toml = "0.8.10" +uninit = "0.6.2" diff --git a/central/rsrem/src/main.rs b/central/rsrem/src/main.rs index f8b5d72..cce38f4 100644 --- a/central/rsrem/src/main.rs +++ b/central/rsrem/src/main.rs @@ -64,6 +64,8 @@ impl Connection { let mut ip: String = String::new(); let mut status: bool; let r: (bool, String, Option); + let ip_addr: IpAddr; + match &self.host { Some(i) => { let check = ipaddress::IPAddress::is_valid(i.to_string()); @@ -109,7 +111,6 @@ impl Connection { dont_fragment: true, }; // let mut ip_addr: IpAddr = Ipv4Addr::new(127, 0, 0, 1); - let ip_addr: IpAddr; if ip.contains(":") { ip_addr = IpAddr::V6(ip.parse().unwrap()); } else {