mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 01:43:22 +00:00
Bump smoltcp version
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
25a918d132
commit
9707b46c7f
@ -9,7 +9,7 @@ impl TryFrom<SocketAddr> for IpEndpoint {
|
||||
|
||||
fn try_from(value: SocketAddr) -> Result<Self> {
|
||||
match value {
|
||||
SocketAddr::IPv4(addr, port) => Ok(IpEndpoint::new(addr.into_address(), port)),
|
||||
SocketAddr::IPv4(addr, port) => Ok(IpEndpoint::new(addr.into(), port)),
|
||||
_ => return_errno_with_message!(
|
||||
Errno::EAFNOSUPPORT,
|
||||
"the address is in an unsupported address family"
|
||||
|
@ -51,13 +51,15 @@ struct CInetAddr {
|
||||
|
||||
impl From<Ipv4Address> for CInetAddr {
|
||||
fn from(value: Ipv4Address) -> Self {
|
||||
Self { s_addr: value.0 }
|
||||
Self {
|
||||
s_addr: value.octets(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CInetAddr> for Ipv4Address {
|
||||
fn from(value: CInetAddr) -> Self {
|
||||
Self(value.s_addr)
|
||||
Self::from(value.s_addr)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user