summaryrefslogtreecommitdiffstats
path: root/src/ssh-generator
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssh-generator')
-rw-r--r--src/ssh-generator/ssh-generator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ssh-generator/ssh-generator.c b/src/ssh-generator/ssh-generator.c
index f906b47568..6fdd4ec27f 100644
--- a/src/ssh-generator/ssh-generator.c
+++ b/src/ssh-generator/ssh-generator.c
@@ -184,10 +184,11 @@ static int add_vsock_socket(
assert(dest);
assert(generated_sshd_template_unit);
- Virtualization v = detect_vm();
+ Virtualization v = detect_virtualization();
if (v < 0)
return log_error_errno(v, "Failed to detect if we run in a VM: %m");
- if (v == VIRTUALIZATION_NONE) {
+ if (!VIRTUALIZATION_IS_VM(v)) {
+ /* NB: if we are running in a container inside a VM, then we'll *not* do AF_VSOCK stuff */
log_debug("Not running in a VM, not listening on AF_VSOCK.");
return 0;
}