Age | Commit message (Collapse) | Author |
|
Fix in ip_equal, plus testing code which led to that fix...
|
|
network.c:
- use the correct macro for IPv4-in-IPv6 test
network_test.c:
- bunch of tests for addr_resolve() and ip_equal()
|
|
Fix leaks and null dereferences in net_crypto
|
|
|
|
|
|
|
|
|
|
|
|
struct in6_addr member names can differ per platform.
|
|
IPv6: post-integration fixes
|
|
|
|
network.c:
- ip_equal(): on IPv4 vs. IPv6, check if the IPv6 is an embedded IPv4 and if true, compare that
|
|
network.c:
- addr_resolve(): save AF_UNSPEC ip4 address into ip4, not into to->ip4
|
|
Also fixed the "[i] could not send message" bug in nTox.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- get_close_nodes(): refactored the inner loop out into get_close_nodes_inner()
|
|
- addr_resolve(): for() instead of while(), flip conditions for a much neater function (suggested by Andreas Schneider)
- ip_ntoa(): enforced termination: terminate at the maximum position, that's the one snprintf() may forget
- networking_poll(): forgot tabs2spaces
|
|
- LAN_ip(): use standard macro from IPv4-in-IPv6 test
|
|
- get_close_nodes()/sendnodes()/sendnodes_ipv6(): when selecting for SEND_NODES/SEND_NODES_IPV6, treat embedded IPv4-in-IPv6 addresses as being IPv4
Messenger.c:
- added a named constant for sixty seconds friend/client dump
- fix logging to convert client_id to printable before printing
|
|
|
|
Nonces don't need to be random, only different.
also random_int now gives same quality random numbers for both NaCl and
libsodium.
|
|
|
|
messages.
|
|
Group chats are not complete, they seem to work very well though.
This means that the functions will change.
|
|
|
|
Please wait until the tox.h API is updated before integrating it into
your clients.
nTox:
/g
creates a new group chat
/i friendnum groupnum
invite friendnum to groupnum
/z groupnum message
send message to groupnum
NOTE: group chats currenly might not handle packet loss well if there are less than 6 participants.
|
|
Patch to allow DHT_bootstrap to also do LAN discovery.
|
|
Conflicts resolved:
toxcore/Messenger.c
toxcore/network.h
|
|
Conflicts:
toxcore/Messenger.c
|
|
This patch inserts LAN discovery in DHT_bootstrap, allowing it to find clients even if it's run parameterless (and clients don't connect to it directly, e.g. because the port is already bound to a different client).
- moves the #define of LAN_DISCOVERY_INTERVAL from Messenger.c to LAN_discovery.h
- includes LAN_discovery.h into DHT_bootstrap.c
- DHT_bootstrap.c sends and accepts LAN_discovery packets
|
|
- addr_resolv(_or_parse_ip)(): added an optional parameter to return both an IPv6 and an IPv4 address if requested address family was AF_UNSPEC
- logging of unhandled packets
DHT.c:
- bootstrap_from_address(): use the additional return from addr_resolv_or_parse_ip() to bootstrap in both network types at once
Lossless_UDP_testclient.c:
- main(): adapt to signature change of addr_resolve()
Messenger.c. LAN_discovery.h:
- lost a htons(), readded
- moved LAN_DISCOVERY_INTERVAL #define into LAN_discovery.h
LAN_discovery.c:
- added IPv4-in-IPv6 local address test
|
|
- remove local PORT definition in favor of TOX_PORT_DEFAULT
|
|
- #define'd tox's network port (as range)
- finally killed tox_new_ex() in favor of changing tox_new()'s signature
- renamed tox_bootstrap() to tox_bootstrap_from_ip()
network.h:
- #define'd tox's network port (as range)
- renamed SEND_NODES_EX to SEND_NODES_IPV6
- bind() loop uses #define'd port range
DHT.c:
- renamed SEND_NODES_EX to SEND_NODES_IPV6
- sending ipv6 node addresses even if can't use them ourselves
nTox.c:
- adapted to changed tox_new()
|
|
|
|
|
|
- removed almost unused variable without further use
|
|
- unbroke Messenger_load(): lost a length adjustment
- addeditional check for enough data available
|
|
- tox_bootstrap_ex(), DHT_bootstrap_ex() renamed to tox_bootstrap_from_address(), DHT_bootstrap_from_address()
- (handle_)sendnodes_ex() renamed to (handle_)sendnodes_ipv6()
- only sending sendnodes_ipv6() if we're actually IPv6 enabled
- changed comments to conform better
nTox.c, Messenger_text.c, DHT_test.c, DHT_bootstrap.c:
- fallout from *_ex() to *_from_address()
DHT_bootstrap.c:
- corrected a potentially wrong info message
util.c:
- fixed logfile name: now (funcptr) => now() (number)
network.c:
- addead comment about the necessity of bind() to succeed
auto_test/messenger_test.c:
- defaulting ipv6enabled to TOX_ENABLE_IPV6_DEFAULT
LAN_discovery.c:
- slight cleanup and comments for clarity
|
|
|
|
- undo "fixing" the wrong variable
- fix the logging in receivepacket()
|
|
- moved cmdline_parsefor_ipv46() to testing/misc_tools.c
|
|
|
|
LAN_discovery.c: IPv6: send both v6 multicast and v4 broadcast if socket allows
|
|
- add missing includes (autobuild warnings)
|
|
- reset errno from failed bind() calls if the last one succeeds
DHT_bootstrap.c:
- move the perror() output next to where it belongs to
|