mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
f8d5e106a0
The `const sockaddr*` conversion was returning a pointer to the sockaddr_in6, but with its family set to AF_INET, so the receiving code would have treated interpreting the result as a sockaddr_in pointer -- but it isn't, and trying to get the IPv4 from the mis-reinterpreted sockaddr_in6 fails; this then prevented uvw UDP binding (which uses the sockaddr* operator) from working. This changes it to always leave the family value at the proper value and using the ipv6_is_mapped_ipv4 check to determine when we have (and should return) a pointer to the sockaddr_in rather than the sockaddr_in6. Also fixes toString() to compare the full prefix instead of just bytes 10 and 11. |
||
---|---|---|
.. | ||
address_info.cpp | ||
address_info.hpp | ||
exit_info.cpp | ||
exit_info.hpp | ||
ip_address.cpp | ||
ip_address.hpp | ||
ip_packet.cpp | ||
ip_packet.hpp | ||
ip_range_map.hpp | ||
ip_range.cpp | ||
ip_range.hpp | ||
ip.cpp | ||
ip.hpp | ||
net_bits.hpp | ||
net_if.hpp | ||
net_int.cpp | ||
net_int.hpp | ||
net.cpp | ||
net.h | ||
net.hpp | ||
route.cpp | ||
route.hpp | ||
sock_addr.cpp | ||
sock_addr.hpp | ||
uint128.hpp |