Move to separate 0.0.0.0:0 and disconnected states for udp AF_UNSPEC
This commit is contained in:
committed by
Mathew John Roberts
parent
da40ffa9ec
commit
7bf209dc8e
@@ -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!(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user