diff --git a/rust/src/nasl/builtin/host/mod.rs b/rust/src/nasl/builtin/host/mod.rs index 9d57a0bc8..60d73bcc5 100644 --- a/rust/src/nasl/builtin/host/mod.rs +++ b/rust/src/nasl/builtin/host/mod.rs @@ -48,7 +48,7 @@ fn get_host_names(context: &Context) -> Result { } /// Return the target's IP address as IpAddr. -fn get_host_ip(context: &Context) -> Result { +pub fn get_host_ip(context: &Context) -> Result { let default_ip = "127.0.0.1"; let r_sock_addr = match context.target() { x if !x.is_empty() => IpAddr::from_str(x), diff --git a/rust/src/nasl/builtin/raw_ip/packet_forgery.rs b/rust/src/nasl/builtin/raw_ip/packet_forgery.rs index 3a477f2ff..71decc73a 100644 --- a/rust/src/nasl/builtin/raw_ip/packet_forgery.rs +++ b/rust/src/nasl/builtin/raw_ip/packet_forgery.rs @@ -2300,7 +2300,7 @@ fn nasl_send_capture( let frame = EthernetPacket::new(packet.data).ok_or_else(|| { FunctionErrorKind::Dirty("No possible to create a packet from buffer".to_string()) })?; - return Ok(NaslValue::Data(frame.payload().to_vec())); + Ok(NaslValue::Data(frame.payload().to_vec())) } Err(_) => Ok(NaslValue::Null), }