Skip to content

Commit 5a122f8

Browse files
committed
Fix socket address family check for VsockAddr::from_raw.
1 parent 5dedbc7 commit 5a122f8

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
@@ -2566,7 +2566,7 @@ pub mod vsock {
25662566
return None;
25672567
}
25682568
}
2569-
if (*addr).sa_family as i32 != libc::AF_INET6 as i32 {
2569+
if (*addr).sa_family as i32 != libc::AF_VSOCK as i32 {
25702570
return None;
25712571
}
25722572
Some(VsockAddr(*(addr as *const libc::sockaddr_vm)))

0 commit comments

Comments
 (0)