arvidn
e92cf18340
fix some warnings around unused variables, dead stores, potentially dereferencing nullptr and calling virtual functions from constructor
2018-07-20 01:03:16 +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
arvidn
10deff2f91
fix some unintentional copies (with explicit moves)
2018-07-01 18:22:32 +02:00
Alden Torres
7621be6df1
fixed signed/unsigned warnings with latest version of Xcode clang ( #3032 )
2018-05-16 16:06:33 +02:00
arvidn
fe612ca167
replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options
2018-05-13 19:25:17 +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
arvidn
52e1a7b6c9
merged RC_1_1 into master
2018-04-15 11:00:57 +02:00
arvidn
9cd0ae67e7
another boost-1.67 build fix
2018-04-13 14:43:41 +02:00
arvidn
f0227451a6
merged RC_1_1 into master
2018-04-13 01:47:41 +02:00
Steven Siloti
236e0e7699
pass default constructed boost::function instead of NULL
...
Clang 6 defines NULL as nullptr which breaks implicit construction
of boost::function from NULL.
2018-04-12 14:32:31 +02:00
Alden Torres
9b1e79660f
removed unnecessary parentheses around min/max, added some const modifier ( #2926 )
2018-04-11 15:19:00 +02:00
arvidn
aaf9304a3b
update year in copyright header
2018-04-09 09:04:33 +02:00
Arvid Norberg
16f1deb3ec
merged RC_1_1 into master
2018-04-04 15:28:33 +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
arvidn
6a2df1034a
add some asserts and checks preventing IPv6 addresses to make it into libtorrent when IPv6 support is disabled
2018-03-31 14:17:06 +02:00
Alden Torres
135e47c929
minimal optimization by using node_id::is_all_zero
2018-03-05 09:01:25 +01:00
Alden Torres
80f5edc500
added some static and const in node.cpp and minor cleanup in rpc_manager.cpp
2018-03-02 11:29:59 +01:00
Alden Torres
5d230a69f2
minor code cleanup
2018-01-30 12:38:08 +01:00
arvidn
65fef972a2
apply some c++11 modernization
2018-01-11 04:51:39 -05: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
94dcd8e14b
remove unused transaction id member of DHT observers
2017-11-12 15:46:33 +01:00
Alden Torres
c771f16c5c
lint guided refactor in dht source code ( #2516 )
2017-11-12 00:50:24 +01:00
arvidn
f41d2b5d3b
move shared_ptr instead of copying them, when constructing DHT observers
2017-11-08 23:09:43 +01:00
pavel.pimenov
f3796060d3
add const
2017-09-29 14:06:40 -07:00
Steven Siloti
8648de3706
DHT nodes should only handle requests on their socket ( #2355 )
2017-09-21 21:00:38 -07:00
arvidn
93bb84d94c
some random cleanup
2017-09-13 08:28:46 +02:00
Alden Torres
7cc2619aad
more use of auto and minor code refactor in routing_table.cpp
2017-09-08 08:49:06 +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
arvidn
7b98af8145
improve type-safety of observer_flags and traversal_flags
2017-08-05 20:20:13 +02:00
arvidn
6b1037eff5
convert enum values that are just used as constants, to actual constants with the correct type
2017-08-04 15:23:20 +02:00
arvidn
8d0f38930e
make udp send flags type safe
2017-07-26 18:09:17 -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
80036f0377
avoid executing timed async task if the dht node is already removed ( #2133 )
2017-07-08 08:32:24 -07:00
Steven Siloti
ec2fb91aa5
reject put messages with incorrect bencoding ( #2118 )
...
add function to check for soft bdecode errors. reject put messages with incorrect bencoding
2017-07-02 18:30:32 -04:00
pavel.pimenov
7af38ba05a
add const and static
2017-06-30 16:07:23 -04:00
pavel.pimenov
92a923134c
fix generate_token
2017-06-30 13:22:30 -04:00
Alden Torres
48ef3b6bf7
implemented support for BEP 51 ( #1652 )
2017-06-12 11:54:11 +02:00
Pavel Pimenov
98a0344196
refactor traversal_algorithm look_for_nodes ( #1982 )
2017-05-29 12:20:52 -04:00
Steven Siloti
22145d8cfa
don't assert when removing a link-local IPv6 interface
2017-05-20 06:10:06 -04:00
arvidn
e870852c66
fix branch factor overflow in traversal algorithm
2017-05-13 08:10:21 -04:00
Alden Torres
4ea318faa0
compilation fix when not TORRENT_ASSERT
2017-04-26 13:46:35 -04:00
arvidn
a9a12e873f
make DHT bootstrapping more robust by not throwing away nodes
2017-04-25 23:03:52 -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
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -04:00
arvidn
86786770b7
merged RC_1_1 into master
2017-03-27 01:24:43 -04:00
arvidn
4d397f5ebf
fix minor robustness issue in DHT bootstrap logic
2017-03-21 12:29:08 -04:00