Skip to content

Commit

Permalink
unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
t4lz committed Jan 8, 2025
1 parent 675fb64 commit e6e16d0
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions mirrord/agent/src/steal/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,48 +79,42 @@ impl PortRedirector for IptablesListener {
} else {
let safe = crate::steal::ip_tables::SafeIpTables::create(
if self.ipv6 {
let output = std::process::Command::new("modprobe")
std::process::Command::new("modprobe")
.arg("ip6table_nat")
.output()
.map_err(|e| {
tracing::warn!(%e, "manual modprobe ip6_tables failed");
AgentError::IPTablesError(format!(
"manual modprobe ip6table_nat failed: {e:?}"
))
})?
.stdout;
let output = String::from_utf8_lossy(&output);
tracing::info!("modprobe output: {output}");
let output = std::process::Command::new("modprobe")
})?;
std::process::Command::new("modprobe")
.arg("ip6_tables")
.output()
.map_err(|e| {
tracing::warn!(%e, "manual modprobe ip6_tables failed");
AgentError::IPTablesError(format!(
"manual modprobe ip6_tables failed: {e:?}"
))
})?
.stdout;
let output = std::process::Command::new("modprobe")
})?;
std::process::Command::new("modprobe")
.arg("nf_nat_ipv6")
.output()
.map_err(|e| {
tracing::warn!(%e, "manual modprobe ip6_tables failed");
AgentError::IPTablesError(format!(
"manual modprobe nf_nat_ipv6 failed: {e:?}"
))
})?
.stdout;
let output = std::process::Command::new("modprobe")
})?;
std::process::Command::new("modprobe")
.arg("nf_conntrack_ipv6")
.output()
.map_err(|e| {
tracing::warn!(%e, "manual modprobe ip6_tables failed");
AgentError::IPTablesError(format!(
"manual modprobe nf_conntrack_ipv6 failed: {e:?}"
))
})?
.stdout;
})?;
new_ip6tables()
} else {
new_iptables()
Expand Down

0 comments on commit e6e16d0

Please sign in to comment.