diff options
author | Andrew Walbran <qwandor@google.com> | 2022-06-07 15:52:03 +0100 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2022-06-07 15:52:03 +0100 |
commit | 5a122f83a045b915695283ccc9f1a69a8c824751 (patch) | |
tree | a26da8e1b16747143b75c980e79e740816a99af7 /src | |
parent | 5dedbc7850448ae3922ab0a833f3eb971bf7e25f (diff) | |
download | nix-5a122f83a045b915695283ccc9f1a69a8c824751.zip |
Fix socket address family check for VsockAddr::from_raw.
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/socket/addr.rs | 2 |
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))) |