Skip to content

Commit f58964a

Browse files
committed
Use vsock.sock instead of vsock.sock_3
1 parent 80d5e7b commit f58964a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

crates/sandchest-node/src/jailer.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,8 @@ impl JailerConfig {
107107
}
108108

109109
/// Host-visible vsock socket path for a jailed VM.
110-
///
111-
/// Firecracker creates the host-side UDS at `{uds_path}_{guest_cid}`.
112-
/// Guest CID is always 3, so the actual file is `vsock.sock_3`.
113110
pub fn host_vsock_path(&self, sandbox_id: &str) -> PathBuf {
114-
self.chroot_root(sandbox_id).join("vsock.sock_3")
111+
self.chroot_root(sandbox_id).join("vsock.sock")
115112
}
116113

117114
/// Convert a host-absolute path to a chroot-relative path.
@@ -404,7 +401,7 @@ mod tests {
404401
let path = config.host_vsock_path("sb_test123");
405402
assert_eq!(
406403
path,
407-
PathBuf::from("/var/sandchest/jailer/firecracker/sb_test123/root/vsock.sock_3")
404+
PathBuf::from("/var/sandchest/jailer/firecracker/sb_test123/root/vsock.sock")
408405
);
409406
}
410407

crates/sandchest-node/src/sandbox.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl SandboxManager {
124124
let dir = format!("{}/sandboxes/{}", self.node_config.data_dir, sandbox_id);
125125
SandboxPaths {
126126
api_socket: format!("{}/api.sock", dir),
127-
vsock: format!("{}/vsock.sock_3", dir),
127+
vsock: format!("{}/vsock.sock", dir),
128128
chroot_root: None,
129129
data_dir: dir.clone(),
130130
dir,

0 commit comments

Comments
 (0)