create patch for workflow

This commit is contained in:
white
2025-10-31 13:01:12 +03:00
parent 1d9a8a641f
commit 8542d33af2

View File

@@ -0,0 +1,19 @@
diff --git a/crates/iptables/src/lib.rs b/crates/iptables/src/lib.rs
index 4a4d6dc..e7d15fc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -92,14 +92,6 @@ pub struct IPTables {
pub is_numeric: bool,
}
-/// Returns `None` because iptables only works on linux
-#[cfg(not(target_os = "linux"))]
-pub fn new(is_ipv6: bool) -> Result<IPTables, Box<dyn Error>> {
- Err(error_from_str("iptables only works on Linux"))
-}
-
-/// Creates a new `IPTables` Result with the command of 'iptables' if `is_ipv6` is `false`, otherwise the command is 'ip6tables'.
-#[cfg(target_os = "linux")]
pub fn new(is_ipv6: bool) -> Result<IPTables, Box<dyn Error>> {
let cmd = if is_ipv6 { "ip6tables" } else { "iptables" };