Adrien Béraud
da1bdf9d4c
dht: retry nodes more aggressively in case of failure
2016-10-16 22:36:52 -04:00
Adrien Béraud
96da4cd85d
build: make logs optional at build time
2016-10-16 22:36:42 -04:00
Adrien Béraud
cfb817d37f
dht: add buckets() utility
2016-10-16 22:36:30 -04:00
Adrien Béraud
9440c03048
dht: log cleanup
2016-10-16 22:36:24 -04:00
Adrien Béraud
aa611bde50
network engine: cleanup
2016-10-15 20:07:37 -04:00
Adrien Béraud
7af856508e
dht: make connectivityChanged family dependent
2016-10-15 19:13:15 -04:00
Adrien Béraud
aaed64039a
dht: fix compilation on clang
2016-10-12 15:02:02 -04:00
Adrien Béraud
a56bf3f115
dhtrunner: handle null callback in pingNode
2016-10-12 13:25:00 -04:00
Adrien Béraud
013b1dfe2e
Merge pull request #138 from sim590/connectivity-changes-detect
...
search: detect connectivity changes
2016-10-11 16:01:59 -04:00
Simon Désaulniers
733f699ff2
search: detect connectivity changes
...
The number of bad nodes is limited in order to help determine presence of
connectivity changes. See https://github.com/savoirfairelinux/opendht/issues/137
for details.
According to the tables, 25 is a good average value for big networks. If the
network is small, normal search expiration process will handle the situation.
2016-10-11 15:54:37 -04:00
Adrien Béraud
eed8ffc792
Merge pull request #139 from savoirfairelinux/recover-from-network-changes
...
dhtrunner: recover from network changes
2016-10-11 11:57:31 -04:00
Simon Désaulniers
8567b7ad84
network_engine: expire requests when clearing NE
...
This is to prevent any thread relying on network_engine's callback to block
forever just like the Dht::sendPing's callback.
2016-10-10 01:51:26 -04:00
Adrien Béraud
64118404fe
dhtrunner: recover from network changes
...
Using a list of bootstrap nodes, we recover from network loss by pinging those
nodes continuously until connected.
Written with Simon Désaulniers.
2016-10-10 01:51:26 -04:00
Simon Désaulniers
bb74dc846c
dht/dhtrunner: enable callback for pingNode
2016-10-10 00:23:53 -04:00
Adrien Béraud
659d893dee
network: transmit large values in multiple packets
2016-10-09 16:22:33 -04:00
Adrien Béraud
f53c7a6785
dht: keep track of storage usage in maintainStorage
2016-10-04 03:09:00 -04:00
Simon Désaulniers
dc0b650aa3
dht: make sure we are synced before sending put
2016-09-23 19:27:59 -04:00
Simon Désaulniers
87cf6faedd
dht/node: don't allow more than 3 auth errors
2016-09-23 19:27:59 -04:00
Simon Désaulniers
ca6aa6706d
dht/value: make 'find_node' queries satisfied by any queries
...
'find_node' requests don't ask for values. Then, the idea of a Query makes less
sense, but since we still need those to map status to network engine requests,
we introduce dummy queries which with the field Query::none. Those queries will
then only serve as key to network engine's requests.
2016-09-23 19:27:58 -04:00
Simon Désaulniers
16e55416a6
network_engine: fix bug token not sent for listen
2016-09-23 19:27:58 -04:00
Simon Désaulniers
3e24058175
dht: fix SearchNode's getListenTime computation
...
When no listen request have been sent yet, getListenTime should tell it's okay
to send pending listen request.
2016-09-23 19:27:55 -04:00
Simon Désaulniers
d1c2b20b28
dht: canGet must allow sending when no token
2016-09-23 13:48:04 -04:00
Adrien Béraud
ccd0cbd8f2
add per IP rate limiting ( #131 )
2016-09-21 15:44:20 -04:00
Adrien Béraud
65bdfaf22b
autotools: fix 'make dist'
2016-09-18 13:55:14 -04:00
Adrien Béraud
23bb6e7a45
dht: use a map for storage
2016-09-16 01:29:33 -04:00
Adrien Béraud
6d38c18572
introduce SockAddr to store IP addresses
2016-09-15 01:38:26 -04:00
Simon Désaulniers
6f7ac21a85
dht: refactor code, terminating a Search (isDone)
...
More code encapsulated in objects method is better for keeping consistent
behavior.
2016-09-14 18:06:25 -04:00
Simon Désaulniers
7c5db84f33
dht: take multiple queries into account
...
The code preceding this would just not take multiple concurrent queries for a
same search into account. This is a bug fix for a bad behavior since the
queries.
2016-09-14 18:06:23 -04:00
Simon Désaulniers
4fecb2066b
dht: SearchNode::canGet criteria using 'update'
...
The criteria has been rewritten (again) exploiting the idea behind the parameter
'update' to take into account the case where we have new distinct requests to
send, then bypass some checks.
2016-09-14 18:06:12 -04:00
Adrien Béraud
eabdddcfb3
dht: fix warnings
2016-09-08 18:02:17 -04:00
Adrien Béraud
a9cc669a95
dht: clarify code
2016-09-08 15:52:18 -04:00
Simon Désaulniers
927c835b8f
dht: call all announce callback appropriately
2016-09-08 12:24:35 -04:00
Simon Désaulniers
5415eaaf60
dht: consider probe query in announce time
2016-09-08 12:24:35 -04:00
Simon Désaulniers
ec587f9b58
dht: make sure search can be flagged "done"
2016-09-08 12:24:35 -04:00
Simon Désaulniers
babfed73f3
dht: use SearchNode::acked for next announce time
2016-09-08 12:24:35 -04:00
Simon Désaulniers
2c0ce576e3
dht: enable data persistence
2016-09-08 12:24:35 -04:00
Simon Désaulniers
8f2cc937c5
dht: introduce light put
...
The 'put' operation will now first check if nodes already store the value we
have to announce. If so, we don't announce it to that node.
2016-09-08 12:24:35 -04:00
Simon Désaulniers
d60672e8ba
dht: remove unnecessary return value
2016-09-07 16:15:06 -04:00
Adrien Béraud
76fd216386
crypto: drop support for GnuTLS < 3.3
2016-09-06 17:18:16 -04:00
Adrien Béraud
91a1471de5
build/autotools: fix build flags
2016-09-06 17:16:33 -04:00
Adrien Béraud
e57eb63c87
securedht: don't complain about certificate announcement
2016-09-06 12:06:30 -04:00
Adrien Béraud
8461f4018d
crypto: avoid using std::to_string
2016-09-06 12:06:30 -04:00
Adrien Béraud
c33c2e7e95
crypto: add key, hash length parameters
2016-09-06 12:06:30 -04:00
Adrien Béraud
7919ca8de1
dht: fail pending operations before clearing them
2016-09-02 14:30:08 -04:00
Adrien Béraud
00ef660952
dht: hide more internal structures
2016-09-02 14:30:08 -04:00
kaldoran
34c6b264df
Add filter of duplicate value
2016-09-01 18:02:23 -04:00
kaldoran
2d8fe502f2
Fix print of the lookup output
2016-09-01 18:02:23 -04:00
kaldoran
73df308250
Adding ZCurve algorithm
2016-09-01 18:02:23 -04:00
kaldoran
cdca40cb59
Rework prefix [add flags] and prepare prefix
2016-09-01 18:02:23 -04:00
kaldoran
2a3c301314
dht: Fix get and put at the same time on a same node
...
When the put is performed just after a get, then the get will not include the value which was in the put.
2016-09-01 18:02:23 -04:00