Commit Graph

176 Commits

Author SHA1 Message Date
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +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
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
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
arvidn 65fef972a2 apply some c++11 modernization 2018-01-11 04:51:39 -05:00
Alden Torres c771f16c5c lint guided refactor in dht source code (#2516) 2017-11-12 00:50:24 +01: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 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Alden Torres 014a07a5c8 allow DHT bootstrap to use nodes of both IP protocols 2017-03-17 20:51:38 -04: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
Alden Torres de6f2a9d88 fixing sign-conversion warnings, part 11, created aux::array and refactor (#1649)
fixing sign-conversion warnings, part 11, created aux::array and refactor
2017-02-04 22:05:53 -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
Alden Torres 070e85090b more std:: prefix, consts, auto refactor, formatting 2017-01-26 08:30:20 -05:00
Pavel Pimenov 516e86d0ea Refactoring routing_table (#1468)
routing_table refactor. ip_set::count -> ip_set::exists. Fix copy-paste routing_table::remove_node
2016-12-28 14:40:56 -08:00
Pavel Pimenov c34a2541cc Log refactoring (#1446)
factor out common logging code in some dht traversal algorithms
2016-12-24 06:46:21 -08:00
Pavel Pimenov 6afb1f3e83 aux::to_hex(sha1) -> sha1.to_hex() (#1418)
generate hex strings into std::string instead of stack-allocated char arrays
2016-12-22 10:44:36 -05:00
Alden Torres d5c4cd7280 fixed sign-compare warnings and some refactor (#1354)
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -05:00
Alden Torres 86251adb1b more fixes of integral type conversion warnings 2016-11-21 20:22:18 -05:00
Alden Torres 84e0362180 more fixes in signed compare warnings (#1345)
more fixes in signed compare warnings
2016-11-21 01:49:56 -05:00
Angel Leon 9cdf0ee50c Boolean simplifications (oct 13th 2016) (#1211)
boolean simplifications
2016-10-14 16:13:18 -04:00
Steven Siloti 85dd682551 fix adding a node with unknown id (#1161)
Commit a414e4c3 broke adding nodes with unknown id to the routing table by
causing them to be evicted when they responded with their real id. This should
have been caught by test_bootstrap, but a typo caused that test to silently
exit early.
2016-09-28 13:28:21 -04:00
Alden Torres db14df5d0d dht code related refactor and cleanup (#1107)
dht code related refactor and cleanup
2016-09-18 20:08:15 -04:00
Alden Torres 65cdc15543 more on log, consts, refs and cleanup in dht related code (#1082)
more on log, consts, refs and cleanup in dht related code. moving print_state out of main source code
2016-09-13 08:18:47 -04:00
Alden Torres 3fa74c6fd5 more consts refs and formatting (#1080) 2016-09-12 09:20:15 -04:00
arvidn 33414de68d merged RC_1_1 into master 2016-09-11 21:01:03 -04:00
Steven Siloti 3a665a1040 fix inconsistant prefix calulcation (#1030)
The special case for calculating the prefix in the last bucket was being
applied to the condidate node but not the existing nodes in the bucket.
2016-08-25 19:26:48 -04:00
arvidn 0126f6f2c6 fix timestamp arithmetic overflow 2016-07-30 00:38:17 -04:00
arvidn e5ecd73751 fix rebase 2016-07-29 18:47:05 -04:00
arvidn 83dba91168 use span for to_hex and from_hex functions 2016-07-29 18:42:18 -04:00
Steven Siloti 0343bb382e always check m_log before using it 2016-07-29 13:32:28 -07:00
Steven Siloti 44ce5c71e7 cleanup ip logging 2016-07-28 20:08:24 -07:00
Steven Siloti 6ebc61cef9 reject nodes with our id after checking for an existing entry
This allows us to evict nodes which start reporting our id as theirs.
2016-07-27 21:10:34 -07:00
Steven Siloti 9d75198f7f re-ping nodes in a bucket when one changes id 2016-07-27 21:10:34 -07:00
Steven Siloti a414e4c3fa remove nodes which change their id
This is based on a suggestion from the8472 to prevent malicious nodes from
polluting the routing table.

https://github.com/the8472/mldht/blob/sanitizing-docs/docs/sanitizing-algorithms.rst
2016-07-27 21:10:33 -07:00
Arvid Norberg 7bf49c0a1c modernize hasher to use array_view (#931)
modernize hasher to use array_view as well as adding array_view support to entry
2016-07-22 07:29:39 -07:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
Arvid Norberg 1facf0eef6 clean-up more defines (#872)
clean-up more defines. remove TORRENT_DEBUG and TORRENT_DISABLE_INVARIANT_CHECKS (instead use TORRENT_USE_ASSERTS and TORRENT_USE_INVARIANT_CHECKS)
2016-07-01 19:46:59 -04:00
Arvid Norberg 6aabe3762b general modernization (#836)
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Alden Torres db65eb320a making dht counters additive (#783)
make dht counters additive to support both IPv4 and IPv6
2016-06-04 14:04:29 -04:00
Arvid Norberg 8c8f5bb03b deprecated public to_hex() and from_hex() functions (#784) 2016-06-04 10:01:43 -04:00
Arvid Norberg 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -04:00