fix behavior to always nullify the address regardless of what is passed in.

This commit is contained in:
Benton60
2026-04-05 01:26:45 -04:00
parent 7c733fc3b3
commit 2b63e37410
+8 -5
View File
@@ -69,12 +69,15 @@ unsafe fn bind_or_connect(
log::warn!("bind/connect with AF_UNIX were replaced with SYS_CALL.");
return Err(Errno(EAFNOSUPPORT));
}
AF_UNSPEC => {
match op {
SocketCall::Connect => format!(""),
SocketCall::Bind => return Err(Errno(EAFNOSUPPORT)),
_ => unreachable!(),
AF_UNSPEC => match op {
SocketCall::Bind => {
//bind is not a valid socket call for AF_UNSPEC
return Err(Errno(EAFNOSUPPORT));
}
SocketCall::Connect => {
format!("{}.{}.{}.{}:{}", 0, 0, 0, 0, 0)
}
_ => unreachable!(),
}
_ => return Err(Errno(EAFNOSUPPORT)),
};