From 5a122f83a045b915695283ccc9f1a69a8c824751 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Tue, 7 Jun 2022 15:52:03 +0100 Subject: Fix socket address family check for VsockAddr::from_raw. --- src/sys/socket/addr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sys/socket') diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs index 8de501a4..ad9e1bcb 100644 --- a/src/sys/socket/addr.rs +++ b/src/sys/socket/addr.rs @@ -2566,7 +2566,7 @@ pub mod vsock { return None; } } - if (*addr).sa_family as i32 != libc::AF_INET6 as i32 { + if (*addr).sa_family as i32 != libc::AF_VSOCK as i32 { return None; } Some(VsockAddr(*(addr as *const libc::sockaddr_vm))) -- cgit v1.2.3