Skip to content

Commit

Permalink
thanks clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
t4lz committed Dec 31, 2024
1 parent 17afc0d commit 5f11055
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mirrord/layer/src/socket/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ pub(super) fn socket(domain: c_int, type_: c_int, protocol: c_int) -> Detour<Raw
Ok(())
}?;

if domain == libc::AF_INET6 {
if crate::setup().layer_config().feature.network.ipv6.not() {
return Detour::Error(HookError::SocketUnsuportedIpv6);
}
if domain == libc::AF_INET6 && crate::setup().layer_config().feature.network.ipv6.not() {
return Detour::Error(HookError::SocketUnsuportedIpv6);
}

let socket_result = unsafe { FN_SOCKET(domain, type_, protocol) };
Expand Down

0 comments on commit 5f11055

Please sign in to comment.