diff --git a/nexus/src/app/rack.rs b/nexus/src/app/rack.rs index b702538dd9..5e77cd56ba 100644 --- a/nexus/src/app/rack.rs +++ b/nexus/src/app/rack.rs @@ -439,7 +439,7 @@ impl super::Nexus { .parse() .unwrap(), ), - network: ipv4_net.clone().into(), + network: (*ipv4_net).into(), }) .collect(), }, @@ -822,8 +822,7 @@ impl super::Nexus { rack_subnet, allocation.subnet_octet.try_into().unwrap(), ) - .net() - .into(), + .net(), }, }, }, diff --git a/sled-agent/src/rack_setup/config.rs b/sled-agent/src/rack_setup/config.rs index 2a057cfdf8..e52ed14304 100644 --- a/sled-agent/src/rack_setup/config.rs +++ b/sled-agent/src/rack_setup/config.rs @@ -98,6 +98,7 @@ mod test { use omicron_common::address::IpRange; use omicron_common::api::internal::shared::AllowedSourceIps; use omicron_common::api::internal::shared::RackNetworkConfig; + use oxnet::Ipv6Net; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; #[test] @@ -125,7 +126,11 @@ mod test { .unwrap(), }, rack_network_config: RackNetworkConfig { - rack_subnet: "fd00:1122:3344:0100::".parse().unwrap(), + rack_subnet: Ipv6Net::new( + "fd00:1122:3344:0100::".parse().unwrap(), + RACK_PREFIX, + ) + .unwrap(), infra_ip_first: Ipv4Addr::LOCALHOST, infra_ip_last: Ipv4Addr::LOCALHOST, ports: Vec::new(), diff --git a/sled-agent/src/rack_setup/service.rs b/sled-agent/src/rack_setup/service.rs index fae759d672..23e95aaf3e 100644 --- a/sled-agent/src/rack_setup/service.rs +++ b/sled-agent/src/rack_setup/service.rs @@ -734,7 +734,7 @@ impl ServiceInner { let rack_network_config = { let config = &config.rack_network_config; NexusTypes::RackNetworkConfigV1 { - rack_subnet: config.rack_subnet.into(), + rack_subnet: config.rack_subnet, infra_ip_first: config.infra_ip_first, infra_ip_last: config.infra_ip_last, ports: config @@ -746,7 +746,7 @@ impl ServiceInner { .routes .iter() .map(|r| NexusTypes::RouteConfig { - destination: r.destination.into(), + destination: r.destination, nexthop: r.nexthop, vlan_id: r.vlan_id, })