lokinet/llarp
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
..
android The Great Wall of Blame 2020-04-07 12:38:56 -06:00
config Merge pull request #1539 from majestrate/path-algorithm-flavors-2021-02-18 2021-03-03 14:06:40 -05:00
consensus The Great Wall of Blame 2020-04-07 12:38:56 -06:00
constants add conf.d directory for config overrides (#1410) 2020-10-21 08:58:08 -04:00
crypto add llarp::CSRNG for cryptographically secure random number generator for use in std::shuffle 2021-03-02 07:20:29 -05:00
dht Merge Logic functions into EventLoop 2021-03-04 16:51:18 -04:00
dns Rename EventLoop::udp to EventLoop::make_udp 2021-03-04 16:51:18 -04:00
ev Export UDP file descriptor (for android) 2021-03-04 16:51:18 -04:00
exit nodedb refactor 2021-02-02 09:35:40 -05:00
handlers Android & hive fixes 2021-03-04 16:51:18 -04:00
hook The Great Wall of Blame 2020-04-07 12:38:56 -06:00
iwp Replace libuv with uvw & related refactoring 2021-03-04 16:51:18 -04:00
link Export UDP file descriptor (for android) 2021-03-04 16:51:18 -04:00
linux Removed RPI definition 2020-05-17 21:28:25 -03:00
messages Make format 2021-03-04 16:51:18 -04:00
net Uncurse SockAddr's sockaddr* operator 2021-03-04 16:51:18 -04:00
path Make format 2021-03-04 16:51:18 -04:00
peerstats proper lokimq -> oxenmq refactor 2021-02-03 13:12:21 -05:00
router Export UDP file descriptor (for android) 2021-03-04 16:51:18 -04:00
routing Config file improvements (#1397) 2020-10-07 18:22:58 -04:00
rpc Make format 2021-03-04 16:51:18 -04:00
service Make format 2021-03-04 16:51:18 -04:00
simulation Replace libuv with uvw & related refactoring 2021-03-04 16:51:18 -04:00
tooling Android & hive fixes 2021-03-04 16:51:18 -04:00
util Make llarp_buffer_t constructible from an rvalue reference 2021-03-04 16:51:18 -04:00
vpn Remove HasNextPacket() (and fix win32) 2021-03-04 16:51:18 -04:00
win32 Config file improvements (#1397) 2020-10-07 18:22:58 -04:00
app.xml
bootstrap.cpp The Great Wall of Blame 2020-04-07 12:38:56 -06:00
bootstrap.hpp The Great Wall of Blame 2020-04-07 12:38:56 -06:00
CMakeLists.txt Merge Logic functions into EventLoop 2021-03-04 16:51:18 -04:00
context.cpp Make format 2021-03-04 16:51:18 -04:00
nodedb.cpp Merge Logic functions into EventLoop 2021-03-04 16:51:18 -04:00
nodedb.hpp Merge Logic functions into EventLoop 2021-03-04 16:51:18 -04:00
pow.cpp The Great Wall of Blame 2020-04-07 12:38:56 -06:00
pow.hpp The Great Wall of Blame 2020-04-07 12:38:56 -06:00
profiling.cpp try fixing deadlock (#1454) 2020-11-05 06:19:43 -05:00
profiling.hpp try fixing deadlock (#1454) 2020-11-05 06:19:43 -05:00
router_contact.cpp nodedb refactor 2021-02-02 09:35:40 -05:00
router_contact.hpp nodedb refactor 2021-02-02 09:35:40 -05:00
router_id.cpp proper lokimq -> oxenmq refactor 2021-02-03 13:12:21 -05:00
router_id.hpp nodedb refactor 2021-02-02 09:35:40 -05:00
router_version.cpp Config file improvements (#1397) 2020-10-07 18:22:58 -04:00
router_version.hpp The Great Wall of Blame 2020-04-07 12:38:56 -06:00
testnet.c prepare for 0.5.0 2019-08-29 07:45:58 -04:00