Skip to content

Commit

Permalink
Fix socket address family check for VsockAddr::from_raw.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor authored and rtzoeller committed Jul 17, 2022
1 parent b2c66a4 commit 8d4c48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sys/socket/addr.rs
Expand Up @@ -2535,7 +2535,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)))
Expand Down

0 comments on commit 8d4c48a

Please sign in to comment.