Skip to content

Commit

Permalink
Upgrade smoltcp to 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Jul 4, 2023
1 parent 7461442 commit 81f5df9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ time = { version = "0.3", default-features = false }
pci_types = { version = "0.5" }

[dependencies.smoltcp]
version = "0.9"
version = "0.10"
optional = true
default-features = false
features = [
Expand Down
12 changes: 6 additions & 6 deletions src/executor/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ impl<'a> NetworkInterface<'a> {
let dhcp = dhcpv4::Socket::new();

// use the current time based on the wall-clock time as seed
let mut config = Config::new();
let mut config = Config::new(hardware_addr);
config.random_seed = (arch::get_boot_time() + arch::processor::get_timer_ticks()) / 1000000;
if device.capabilities().medium == Medium::Ethernet {
config.hardware_addr = Some(hardware_addr);
config.hardware_addr = hardware_addr;
}

let iface = Interface::new(config, &mut device);
let iface = Interface::new(config, &mut device, crate::executor::now());
let mut sockets = SocketSet::new(vec![]);
let dhcp_handle = sockets.add(dhcp);

Expand Down Expand Up @@ -148,13 +148,13 @@ impl<'a> NetworkInterface<'a> {
info!("MTU: {} bytes", mtu);

// use the current time based on the wall-clock time as seed
let mut config = Config::new();
let mut config = Config::new(hardware_addr);
config.random_seed = (arch::get_boot_time() + arch::processor::get_timer_ticks()) / 1000000;
if device.capabilities().medium == Medium::Ethernet {
config.hardware_addr = Some(hardware_addr).into();
config.hardware_addr = hardware_addr;
}

let mut iface = Interface::new(config, &mut device);
let mut iface = Interface::new(config, &mut device, crate::executor::now());
iface.update_ip_addrs(|ip_addrs| {
ip_addrs
.push(IpCidr::new(
Expand Down

0 comments on commit 81f5df9

Please sign in to comment.