Bump smoltcp version

This commit is contained in:
Ruihan Li
2024-10-19 17:38:30 +08:00
committed by Tate, Hongliang Tian
parent 25a918d132
commit 9707b46c7f
5 changed files with 11 additions and 9 deletions

View File

@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
keyable-arc = { path = "../keyable-arc" }
ostd = { path = "../../../ostd" }
smoltcp = { git = "https://github.com/asterinas/smoltcp", rev = "37716bf", default-features = false, features = [
smoltcp = { git = "https://github.com/asterinas/smoltcp", tag = "r_2024-11-08_f07e5b5", default-features = false, features = [
"alloc",
"log",
"medium-ethernet",

View File

@ -8,7 +8,7 @@ use smoltcp::{
phy::{DeviceCapabilities, TxToken},
wire::{
self, ArpOperation, ArpPacket, ArpRepr, EthernetAddress, EthernetFrame, EthernetProtocol,
EthernetRepr, IpAddress, Ipv4Address, Ipv4Cidr, Ipv4Packet,
EthernetRepr, IpAddress, Ipv4Address, Ipv4AddressExt, Ipv4Cidr, Ipv4Packet,
},
};
@ -157,7 +157,7 @@ impl<D, E> EtherIface<D, E> {
..
} => {
// Ignore the ARP packet if the source addresses are not unicast.
if !source_hardware_addr.is_unicast() || !source_protocol_addr.is_unicast() {
if !source_hardware_addr.is_unicast() || !source_protocol_addr.x_is_unicast() {
return None;
}

View File

@ -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"

View File

@ -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)
}
}