Skip to content

Commit 8d4c48a

Browse files
qwandorrtzoeller
authored andcommitted
Fix socket address family check for VsockAddr::from_raw.
1 parent b2c66a4 commit 8d4c48a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/socket/addr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ pub mod vsock {
25352535
return None;
25362536
}
25372537
}
2538-
if (*addr).sa_family as i32 != libc::AF_INET6 as i32 {
2538+
if (*addr).sa_family as i32 != libc::AF_VSOCK as i32 {
25392539
return None;
25402540
}
25412541
Some(VsockAddr(*(addr as *const libc::sockaddr_vm)))

0 commit comments

Comments
 (0)