You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Leans on the fact that SocketAddrV4 and SocketAddrV6 are
// transparent wrappers around sockaddr_in and sockaddr_in6.
A lot of crates were recently patched to remove the assumption of the memory layout of network primitives. Any code continuing to do so will result in UB, so I wanted to raise this issue.
The text was updated successfully, but these errors were encountered:
std::net::Ipv4Addr and std::net::Ipv6Addr are no longer transparent
wrappers around their respective libc types. Construct them manually
rather than through casting.
Fixes#9.
std::net::Ipv4Addr and std::net::Ipv6Addr are no longer transparent
wrappers around their respective libc types. Construct them manually
rather than through casting.
Fixes#9.
Context: rust-lang/rust#78802 and https://www.reddit.com/r/rust/comments/wcw93o/a_major_refactor_of_rusts_ip_address/
These lines caught my eye while I was reading the code:
netif/src/lib.rs
Lines 189 to 190 in 550ec42
netif/src/lib.rs
Lines 331 to 332 in 550ec42
A lot of crates were recently patched to remove the assumption of the memory layout of network primitives. Any code continuing to do so will result in UB, so I wanted to raise this issue.
The text was updated successfully, but these errors were encountered: