From f7cdcd7e87efb6692456253c8148cdafa481cae9 Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Tue, 17 Dec 2024 21:29:39 +0100 Subject: [PATCH] Parse unix address from sockaddr without length --- src/sys/socket/addr.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs index 003db4c3d3..a63065b3cd 100644 --- a/src/sys/socket/addr.rs +++ b/src/sys/socket/addr.rs @@ -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 })