Skip to content

Commit 546f6f6

Browse files
authored
Merge pull request #120 from Burning1020/fix-priv-netns
network: fix private sandbox netns
2 parents 45ff19d + b4c2463 commit 546f6f6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

vmm/common/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub const HOSTNAME_FILENAME: &str = "hostname";
3535
pub const RESOLV_FILENAME: &str = "resolv.conf";
3636

3737
pub const SANDBOX_NS_PATH: &str = "/run/sandbox-ns";
38-
pub const NET_NAMESPACE: &str = "net";
38+
pub const NET_NAMESPACE: &str = "network";
3939
pub const IPC_NAMESPACE: &str = "ipc";
4040
pub const UTS_NAMESPACE: &str = "uts";
4141
pub const CGROUP_NAMESPACE: &str = "cgroup";

vmm/task/src/main.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ use signal_hook_tokio::Signals;
4040
use tokio::fs::File;
4141
use vmm_common::{
4242
api::sandbox_ttrpc::create_sandbox_service, mount::mount, ETC_RESOLV, HOSTNAME_FILENAME,
43-
IPC_NAMESPACE, KUASAR_STATE_DIR, NET_NAMESPACE, RESOLV_FILENAME, SANDBOX_NS_PATH,
44-
UTS_NAMESPACE,
43+
IPC_NAMESPACE, KUASAR_STATE_DIR, RESOLV_FILENAME, SANDBOX_NS_PATH, UTS_NAMESPACE,
4544
};
4645

4746
use crate::{
@@ -131,7 +130,6 @@ lazy_static! {
131130
options: vec!["relatime", "nodev", "sync", "dirsync",]
132131
},];
133132
static ref CLONE_FLAG_TABLE: HashMap<String, CloneFlags> = HashMap::from([
134-
(String::from(NET_NAMESPACE), CloneFlags::CLONE_NEWNET),
135133
(String::from(IPC_NAMESPACE), CloneFlags::CLONE_NEWIPC),
136134
(String::from(UTS_NAMESPACE), CloneFlags::CLONE_NEWUTS),
137135
]);

0 commit comments

Comments
 (0)