Skip to content

Commit

Permalink
Parse unix address from sockaddr without length
Browse files Browse the repository at this point in the history
  • Loading branch information
pronebird authored Dec 17, 2024
1 parent 5674377 commit f7cdcd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sys/socket/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,9 @@ impl SockaddrLike for SockaddrStorage {
libc::AF_ALG => unsafe {
AlgAddr::from_raw(addr, l).map(|alg| Self { alg })
},
libc::AF_UNIX => unsafe {
UnixAddr::from_raw(addr, l).map(|su| Self { su })
},
#[cfg(feature = "net")]
libc::AF_INET => unsafe {
SockaddrIn::from_raw(addr, l).map(|sin| Self { sin })
Expand Down

0 comments on commit f7cdcd7

Please sign in to comment.