Skip to content

Commit

Permalink
Adapt RouteSettingsV4 to recent dendrite changes
Browse files Browse the repository at this point in the history
`nexthop` entries are no longer optional, and every place we
instantiated a `RouteEntryV4` is guaranteed to have such an entry.
  • Loading branch information
FelixMcFelix committed Sep 29, 2023
1 parent 91590ab commit 670332e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nexus/src/app/sagas/switch_port_settings_apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub(crate) fn api_to_dpd_port_settings(
.to_string(),
RouteSettingsV4 {
link_id: link_id.0,
nexthop: Some(gw),
nexthop: gw,
vid: r.vid.map(Into::into),
},
);
Expand All @@ -194,7 +194,7 @@ pub(crate) fn api_to_dpd_port_settings(
.to_string(),
RouteSettingsV6 {
link_id: link_id.0,
nexthop: Some(gw),
nexthop: gw,
vid: r.vid.map(Into::into),
},
);
Expand Down
3 changes: 1 addition & 2 deletions sled-agent/src/bootstrap/early_networking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,13 @@ impl<'a> EarlyNetworkSetup<'a> {
e
))
})?;
let nexthop = Some(uplink_config.gateway_ip);
dpd_port_settings.v4_routes.insert(
Ipv4Cidr { prefix: "0.0.0.0".parse().unwrap(), prefix_len: 0 }
.to_string(),
RouteSettingsV4 {
link_id: link_id.0,
vid: uplink_config.uplink_vid,
nexthop,
nexthop: uplink_config.gateway_ip,
},
);
Ok((ipv6_entry, dpd_port_settings, port_id))
Expand Down
2 changes: 1 addition & 1 deletion wicketd/src/preflight_check/uplink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ fn build_port_settings(
DPD_DEFAULT_IPV4_CIDR.parse().unwrap(),
RouteSettingsV4 {
link_id: link_id.0,
nexthop: Some(uplink.gateway_ip),
nexthop: uplink.gateway_ip,
vid: uplink.uplink_vid,
},
);
Expand Down

0 comments on commit 670332e

Please sign in to comment.