Move to separate 0.0.0.0:0 and disconnected states for udp AF_UNSPEC

This commit is contained in:
Benton60
2026-04-10 17:55:26 +00:00
committed by Mathew John Roberts
parent da40ffa9ec
commit 7bf209dc8e
+3 -2
View File
@@ -71,11 +71,12 @@ unsafe fn bind_or_connect(
}
AF_UNSPEC => match op {
SocketCall::Bind => {
//bind is not a valid socket call for AF_UNSPEC
// Bind is not a valid socket call for AF_UNSPEC
return Err(Errno(EAFNOSUPPORT));
}
SocketCall::Connect => {
format!("0.0.0.0:0")
// When a connect is made using AF_UNSPEC TCP and UDP need to disconnect from the default peer
format!("disconnect")
}
_ => unreachable!(),
},