FranciscoPombal
0eee042bf9
Fix some more unlikely integer truncation
2020-02-28 09:10:44 +01:00
FranciscoPombal
091dbd6494
Fix possible output truncation in test_dht
2020-02-23 18:15:41 +01:00
Arvid Norberg
ff113a262c
make it a bit more likely to split the last bucket in the DHT routing table
2019-08-12 15:08:49 -07:00
Arvid Norberg
bd0d011536
make test_dht deterministic
2019-07-31 19:04:29 -07:00
arvidn
b1b03a0d77
factor out and unit test parts of the DHT routing table logic that handles the affinity of nodes to insert. Specifically, make sure the even distribution within routing table buckets works correctly
2019-07-30 07:56:18 -07:00
arvidn
3995ffeafd
similar to how low RTT DHT nodes are preferred over high RTT nodes, also have an affinity for nodes with node IDs derived from their IP
2019-07-28 16:13:16 -07:00
Steven Siloti
aec5c50282
Track the mapped port for each NAT mapping transport ( #3793 )
...
* Track the mapped port for each NAT mapping transport
Each transport needs to be tracked separately so that a failed mapping request
doesn't cause the listen port for a socket to be cleared to zero.
* add template specialization to allow enums as indexes
* use aux::array for port mappings
2019-04-22 01:50:44 +02:00
arvidn
64600f444b
improve sanitizer rule in Jamfile. Some fixes for new clang sanitizr 'implicit-conversion'
2019-03-26 10:14:06 +01:00
arvidn
3891f77253
fix naming in test_dht. don't include deprecated header (lazy_entry) unless required
2019-02-21 23:05:42 +01:00
arvidn
7f2a78d0c9
make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes
2019-02-19 01:48:08 +01:00
arvidn
5383854768
make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts
2018-11-16 14:06:22 +01:00
arvidn
6be8b395da
some cleanup turning memcmp() and memcpy() into span comparisons and std::copy(). some more use of random_bytes() instead of loops.
2018-11-05 18:52:45 +01:00
Arvid Norberg
b90564d418
remove the IPv6 enable/disable build config
2018-08-19 22:20:54 +02:00
arvidn
28bd7102be
fix some conversion warnings by using std::abs() instead of fabs()
2018-08-09 16:11:25 +02:00
arvidn
4633258fbe
make the DHT announce flags a strong type
2018-07-16 12:04:16 +02:00
Steven Siloti
961cf62cad
dht: announce with per-interface listen port
2018-07-12 08:36:57 +02:00
Steven Siloti
96d215a32a
only allow pinged nodes into the routing table ( #3006 )
...
This is an attempt to prevent bogus nodes entering the routing table and
being propogated to other nodes.
2018-05-08 12:47:29 +02:00
Alden Torres
9b1e79660f
removed unnecessary parentheses around min/max, added some const modifier ( #2926 )
2018-04-11 15:19:00 +02:00
Alden Torres
5b922072e9
avoid calls to .address() when looking for endpoint protocol ( #2892 )
...
using is_v4 and is_v6 where possible
2018-04-01 13:48:17 +02:00
Alden Torres
2d3e394226
fixing warnings in tests code, part10, final
2018-02-02 20:59:01 +01:00
Alden Torres
4abeacdf33
fixing warnings in tests code, part8
2018-01-31 01:14:23 +01:00
Alden Torres
73a7050185
fixing warnings in tests code, part7
2018-01-30 12:34:53 +01:00
Alden Torres
11aa4ee66a
fixing warnings in tests code, part6 ( #2745 )
2018-01-29 12:40:44 +01:00
Alden Torres
070d1cd61f
fixing warnings in tests code, part5 ( #2736 )
2018-01-28 00:56:21 +01:00
Alden Torres
8d379dd944
fixing warnings in tests code, part3
2018-01-25 09:09:21 +01:00
arvidn
753826cbb8
merger RC_1_1 into master
2017-12-23 18:15:01 +01:00
arvidn
62bf524e75
disable DHT logging with the TORRENT_DISABLE_LOGGING macros as well
2017-12-23 12:01:18 +01:00
arvidn
f41d2b5d3b
move shared_ptr instead of copying them, when constructing DHT observers
2017-11-08 23:09:43 +01:00
arvidn
9111d5977e
make the variables holding the source of external IPs type-safe
2017-10-10 22:38:36 +02:00
Steven Siloti
8648de3706
DHT nodes should only handle requests on their socket ( #2355 )
2017-09-21 21:00:38 -07:00
arvidn
e36b066020
make logging alerts enabled by default in autoconf builds
2017-09-05 09:21:08 +02:00
arvidn
bb51dcdbb9
move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace
2017-09-04 22:38:16 +02:00
Steven Siloti
5eba09fce7
changes based on review feedback
2017-07-21 19:18:44 -07:00
Steven Siloti
f0ae2145ea
use a handle class for listen sockets instead of raw pointers
...
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.
To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
Steven Siloti
2e79c5e648
fix handling of SSL listen sockets
2017-07-10 21:41:39 -07:00
Alden Torres
48ef3b6bf7
implemented support for BEP 51 ( #1652 )
2017-06-12 11:54:11 +02:00
arvidn
e0fa1cd247
merged RC_1_1 into master
2017-05-12 21:46:45 -04:00
arvidn
a9a12e873f
make DHT bootstrapping more robust by not throwing away nodes
2017-04-25 23:03:52 -04:00
arvidn
d138f02424
introduce lt namespace alias
2017-04-23 23:43:58 -04:00
Steven Siloti
bcfaf9621a
fixes from review
2017-04-23 19:49:49 -04:00
Steven Siloti
cdd50be859
create a separate DHT node for each listen socket
2017-04-23 19:49:49 -04:00
Alden Torres
014a07a5c8
allow DHT bootstrap to use nodes of both IP protocols
2017-03-17 20:51:38 -04:00
arvidn
3a1379ef1e
merged RC_1_1 into master
2017-03-14 12:55:13 -04:00
Alden Torres
ee4d82d166
fix in DHT counters, alert types test, typos, formatting ( #1747 )
...
fix in DHT counters, alert types test, typos, formatting
2017-02-22 17:40:14 -05:00
Alden Torres
1e98bf19a5
added support for enumerating the internal DHT live nodes ( #1712 )
...
added support for enumerating the internal DHT live nodes
2017-02-18 23:02:23 -05:00
Arvid Norberg
c00a25a645
back-port aldenml's fix to not save replacement nodes twice to 1.1 ( #1661 )
...
back-port aldenml's fix to not save replacement nodes twice to 1.1
2017-02-04 19:58:32 -05:00
Alden Torres
3ef4109bf3
avoid double saving of replacements nodes, removed replacement_cache, test ( #1656 )
...
avoid double saving of replacements nodes, deprecated replacement_cache, test
2017-02-04 11:25:11 -05:00
Arvid Norberg
57f52adc88
various cleanup ( #1497 )
...
* various cleanup
* fix
* cleanup
2017-01-06 01:39:01 -05:00
arvidn
a087a283de
make tests print to stdout instead of stderr
2017-01-02 11:28:41 -05:00
Arvid Norberg
54f052a97b
allocation slot type ( #1352 )
...
use a specialized type for allocation slot indices
2016-11-26 03:09:01 -05:00