You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.
3 years ago
..
android The Great Wall of Blame 4 years ago
config Merge pull request #1539 from majestrate/path-algorithm-flavors-2021-02-18 3 years ago
consensus The Great Wall of Blame 4 years ago
constants add conf.d directory for config overrides (#1410) 4 years ago
crypto add llarp::CSRNG for cryptographically secure random number generator for use in std::shuffle 3 years ago
dht Merge Logic functions into EventLoop 3 years ago
dns Rename EventLoop::udp to EventLoop::make_udp 3 years ago
ev Export UDP file descriptor (for android) 3 years ago
exit nodedb refactor 3 years ago
handlers Android & hive fixes 3 years ago
hook The Great Wall of Blame 4 years ago
iwp Replace libuv with uvw & related refactoring 3 years ago
link Export UDP file descriptor (for android) 3 years ago
linux Removed RPI definition 4 years ago
messages Make format 3 years ago
net Uncurse SockAddr's sockaddr* operator 3 years ago
path Make format 3 years ago
peerstats proper lokimq -> oxenmq refactor 3 years ago
router Export UDP file descriptor (for android) 3 years ago
routing Config file improvements (#1397) 4 years ago
rpc Make format 3 years ago
service Make format 3 years ago
simulation Replace libuv with uvw & related refactoring 3 years ago
tooling Android & hive fixes 3 years ago
util Make llarp_buffer_t constructible from an rvalue reference 3 years ago
vpn Remove HasNextPacket() (and fix win32) 3 years ago
win32 Config file improvements (#1397) 4 years ago
CMakeLists.txt Merge Logic functions into EventLoop 3 years ago
app.xml stray tag ;-; 6 years ago
bootstrap.cpp The Great Wall of Blame 4 years ago
bootstrap.hpp The Great Wall of Blame 4 years ago
context.cpp Make format 3 years ago
nodedb.cpp Merge Logic functions into EventLoop 3 years ago
nodedb.hpp Merge Logic functions into EventLoop 3 years ago
pow.cpp The Great Wall of Blame 4 years ago
pow.hpp The Great Wall of Blame 4 years ago
profiling.cpp try fixing deadlock (#1454) 4 years ago
profiling.hpp try fixing deadlock (#1454) 4 years ago
router_contact.cpp nodedb refactor 3 years ago
router_contact.hpp nodedb refactor 3 years ago
router_id.cpp proper lokimq -> oxenmq refactor 3 years ago
router_id.hpp nodedb refactor 3 years ago
router_version.cpp Config file improvements (#1397) 4 years ago
router_version.hpp The Great Wall of Blame 4 years ago
testnet.c prepare for 0.5.0 5 years ago