Repository: metalbear-co/mirrord (language: rust)

Issue:
Make `hide_ipv6_interfaces` on by default



Discussion / hints:
<p><a href="https://linear.app/metalbear/issue/MBE-477/make-hide-ipv6-interfaces-on-by-default">MBE-477 Make `hide_ipv6_interfaces` on by default</a></p>
@aviram Should this be this highly prioritized? Don't we want to wait a bit before making turning this on by default?

Fix patch:
diff --git a/changelog.d/2849.changed.md b/changelog.d/2849.changed.md
new file mode 100644
index 00000000000..b62b8717092
--- /dev/null
+++ b/changelog.d/2849.changed.md
@@ -0,0 +1,1 @@
+hide ipv6 interfaces by default
diff --git a/mirrord-schema.json b/mirrord-schema.json
index 356ba6d3bf2..b2dc542aecb 100644
--- a/mirrord-schema.json
+++ b/mirrord-schema.json
@@ -790,7 +790,7 @@
         },
         "readlink": {
           "title": "_experimental_ readlink {#experimental-readlink}",
-          "description": "Enables the `readlink` hook.",
+          "description": "DEPRECATED, WILL BE REMOVED",
           "type": [
             "boolean",
             "null"
diff --git a/mirrord/config/src/experimental.rs b/mirrord/config/src/experimental.rs
index 114a7a2cf37..e66bb365d3d 100644
--- a/mirrord/config/src/experimental.rs
+++ b/mirrord/config/src/experimental.rs
@@ -19,7 +19,7 @@ pub struct ExperimentalConfig {
 
     /// ### _experimental_ readlink {#experimental-readlink}
     ///
-    /// Enables the `readlink` hook.
+    /// DEPRECATED, WILL BE REMOVED
     #[config(default = false)]
     pub readlink: bool,
 
@@ -40,7 +40,7 @@ pub struct ExperimentalConfig {
     /// ### _experimental_ hide_ipv6_interfaces {#experimental-hide_ipv6_interfaces}
     ///
     /// Enables `getifaddrs` hook that removes IPv6 interfaces from the list returned by libc.
-    #[config(default = false)]
+    #[config(default = true)]
     pub hide_ipv6_interfaces: bool,
 
     /// ### _experimental_ disable_reuseaddr {#experimental-disable_reuseaddr}


Test patch:
diff --git a/mirrord/layer/tests/issue2807.rs b/mirrord/layer/tests/issue2807.rs
index 651f19b1ffa..c62d78032cd 100644
--- a/mirrord/layer/tests/issue2807.rs
+++ b/mirrord/layer/tests/issue2807.rs
@@ -19,46 +19,6 @@ mod common;
 
 pub use common::*;
 
-/// Verify that issue [#2807](https://github.com/metalbear-co/mirrord/issues/2807) still fails user application if
-/// [`ExperimentalConfig::hide_ipv6_interfaces`](mirrord_config::experimental::ExperimentalConfig::hide_ipv6_interfaces) is not set.
-#[rstest]
-#[tokio::test]
-#[timeout(Duration::from_secs(60))]
-async fn test_issue2807_without_ipv6_ignore(
-    #[values(Application::NodeIssue2807)] application: Application,
-    dylib_path: &Path,
-) {
-    let dir = tempfile::tempdir().unwrap();
-    let file_id = rand::thread_rng().gen::<u64>();
-    let config_path = dir.path().join(format!("{file_id:X}.json"));
-
-    let config = serde_json::json!({
-        "feature": {
-            "network": {
-                "dns": false
-            },
-            "fs": "local",
-        }
-    });
-
-    tokio::fs::write(&config_path, serde_json::to_string_pretty(&config).unwrap())
-        .await
-        .expect("failed to saving layer config to tmp file");
-
-    let (mut test_process, intproxy) = application
-        .start_process_with_layer(
-            dylib_path,
-            Default::default(),
-            Some(config_path.to_str().unwrap()),
-        )
-        .await;
-
-    let handle = tokio::spawn(handle_port_subscriptions(intproxy));
-
-    test_process.wait_assert_fail().await;
-    handle.await.unwrap();
-}
-
 /// Verify that issue [#2807](https://github.com/metalbear-co/mirrord/issues/2807) does not fail user application if
 /// [`ExperimentalConfig::hide_ipv6_interfaces`](mirrord_config::experimental::ExperimentalConfig::hide_ipv6_interfaces) is set.
 #[rstest]
@@ -73,9 +33,6 @@ async fn test_issue2807_with_ipv6_ignore(
     let config_path = dir.path().join(format!("{file_id:X}.json"));
 
     let config = serde_json::json!({
-        "experimental": {
-            "hide_ipv6_interfaces": true
-        },
         "feature": {
             "network": {
                 "dns": false