This commit is contained in:
2024-10-17 07:49:55 +00:00
parent c9806be704
commit acd348572d
6 changed files with 15 additions and 15 deletions

View File

@ -38,7 +38,7 @@ use crate::{
},
},
exception::{irqdesc::IrqReturn, IrqNumber},
filesystem::{kernfs::KernFSInode, mbr::MbrDiskPartionTable, sysfs::AttributeGroup},
filesystem::{kernfs::KernFSInode, mbr::MbrDiskPartionTable},
init::initcall::INITCALL_POSTCORE,
libs::{
rwlock::{RwLockReadGuard, RwLockWriteGuard},

View File

@ -286,7 +286,9 @@ impl LoopbackInterface {
smoltcp::iface::Interface::new(iface_config, &mut driver, Instant::now().into());
//设置网卡地址为127.0.0.1
iface.update_ip_addrs(|ip_addrs| {
ip_addrs.push(IpCidr::new(IpAddress::v4(127, 0, 0, 1), 8)).expect("Push ipCidr failed: full");
ip_addrs
.push(IpCidr::new(IpAddress::v4(127, 0, 0, 1), 8))
.expect("Push ipCidr failed: full");
});
Arc::new(LoopbackInterface {