summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2022-06-07 15:52:03 +0100
committerAndrew Walbran <qwandor@google.com>2022-06-07 15:52:03 +0100
commit5a122f83a045b915695283ccc9f1a69a8c824751 (patch)
treea26da8e1b16747143b75c980e79e740816a99af7
parent5dedbc7850448ae3922ab0a833f3eb971bf7e25f (diff)
downloadnix-5a122f83a045b915695283ccc9f1a69a8c824751.zip
Fix socket address family check for VsockAddr::from_raw.
-rw-r--r--src/sys/socket/addr.rs2
1 files changed, 1 insertions, 1 deletions
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)))