Skip to content

Commit

Permalink
Fix experimental build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehforsch authored and nichtsfrei committed Dec 5, 2024
1 parent ea3c33a commit 58bdf81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rust/src/nasl/builtin/host/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn get_host_names(context: &Context) -> Result<NaslValue, FunctionErrorKind> {
}

/// Return the target's IP address as IpAddr.
fn get_host_ip(context: &Context) -> Result<IpAddr, FunctionErrorKind> {
pub fn get_host_ip(context: &Context) -> Result<IpAddr, FunctionErrorKind> {
let default_ip = "127.0.0.1";
let r_sock_addr = match context.target() {
x if !x.is_empty() => IpAddr::from_str(x),
Expand Down
2 changes: 1 addition & 1 deletion rust/src/nasl/builtin/raw_ip/packet_forgery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down

0 comments on commit 58bdf81

Please sign in to comment.