lokinet/llarp/net
Jason Rhinelander f8d5e106a0 Uncurse SockAddr's sockaddr* operator
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.
2021-03-04 16:51:18 -04:00
..
address_info.cpp get rid of use of llarp::IpAddress from hotpaths 2021-02-22 10:01:05 -05:00
address_info.hpp feedback from tom. 2021-02-23 05:48:50 -05:00
exit_info.cpp
exit_info.hpp Config file improvements (#1397) 2020-10-07 18:22:58 -04:00
ip_address.cpp initial v6 exits 2021-02-16 10:59:57 -05:00
ip_address.hpp initial v6 exits 2021-02-16 10:59:57 -05:00
ip_packet.cpp Large collection of changes to make android work 2021-03-02 13:18:22 -05:00
ip_packet.hpp Replace libuv with uvw & related refactoring 2021-03-04 16:51:18 -04:00
ip_range_map.hpp Lns exits (#1407) 2020-10-21 05:39:01 -04:00
ip_range.cpp * rework exit codepath to allow multiple exits 2020-07-02 11:13:30 -04:00
ip_range.hpp feedback from jason 2021-03-02 07:20:29 -05:00
ip.cpp make format 2020-05-20 19:48:13 -03:00
ip.hpp initial v6 exits 2021-02-16 10:59:57 -05:00
net_bits.hpp SockAddr fixes and cleanups 2021-02-24 19:34:42 -04:00
net_if.hpp use lokimq workers instead of llarp:🧵:ThreadPool 2020-07-02 11:07:34 -04:00
net_int.cpp Large collection of changes to make android work 2021-03-02 13:18:22 -05:00
net_int.hpp tun code refactor (#1495) 2021-01-11 18:13:22 -05:00
net.cpp Android & hive fixes 2021-03-04 16:51:18 -04:00
net.h
net.hpp Large collection of changes to make android work 2021-03-02 13:18:22 -05:00
route.cpp get rid of use of llarp::IpAddress from hotpaths 2021-02-22 10:01:05 -05:00
route.hpp initial route poking 2020-08-24 20:21:55 -04:00
sock_addr.cpp Uncurse SockAddr's sockaddr* operator 2021-03-04 16:51:18 -04:00
sock_addr.hpp Large collection of changes to make android work 2021-03-02 13:18:22 -05:00
uint128.hpp Config file improvements (#1397) 2020-10-07 18:22:58 -04:00