Commit Graph

84 Commits

Author SHA1 Message Date
Grant Limberg
b1d60df44c timestamps changed from uint64_t to int64_t
There were cases in the code where time calculations and comparisons were overflowing and causing connection instability.  This will keep time calculations within expected ranges.
2017-10-02 15:52:57 -07:00
Adam Ierymenko
f8014413a3 Add UDP MTU configurability. 2017-09-01 16:25:34 -07:00
Adam Ierymenko
dab0fb9e05 Remote trace: plumbing, replace old TRACE with calls to Trace object. 2017-07-07 16:58:05 -07:00
Adam Ierymenko
1b68d6dbdc License header update. 2017-04-27 20:47:25 -07:00
Adam Ierymenko
e4896b257f Add thread PTR that gets passed through the entire ZT core call stack and then passed to handler functions resulting from a call. 2017-03-27 17:03:17 -07:00
Adam Ierymenko
1615ef1114 Rename getBestRoot() etc. 2016-11-17 16:31:58 -08:00
Grant Limberg
8ffae313fd add new files & remove old ones from VS project. Now builds & runs on Windows again 2016-11-03 12:10:50 -07:00
Adam Ierymenko
cc4bacc199 Cleanup, and implement compression disable flag for networks. 2016-09-27 12:22:25 -07:00
Adam Ierymenko
ab9afbc749 (1) Public networks now get COMs even though they do not gate with them since they will need them to push auth for multicast stuff, (2) added a bunch of rate limit circuit breakers for anti-DOS, (3) cleanup. 2016-09-09 11:36:10 -07:00
Adam Ierymenko
0d4109a9f1 More refactoring to clean up code, and add a gate function to make sure we do not handle OK packets we did not expect. This hardens up a few potential edge cases around security, since such messages might be used to e.g. pollute a cache and DOS under certain conditions. 2016-09-09 08:43:58 -07:00
Adam Ierymenko
0dfc08b317 Tidy up a few minor protocol things, improve documentation in Packet.hpp. 2016-08-23 11:29:02 -07:00
Adam Ierymenko
e1310a764a More cleanup and removal of cruft due to obsolete network-specific relays (will be replaced with federation stuff). 2016-08-09 15:45:26 -07:00
Adam Ierymenko
00fd9c3a15 It builds... almost ready to test some rules engine stuff. 2016-08-08 17:33:26 -07:00
Adam Ierymenko
7b7ab823b0 Fix getPeer(self) bug if I am the controller. 2016-06-28 22:49:01 +00:00
Adam Ierymenko
8b9519f0af Simplify a bunch of NetworkConfig stuff by eliminating accessors, also makes network controller easier to refactor. 2016-05-06 16:13:11 -07:00
Adam Ierymenko
31db6f8f36 NetworkConfig refactor almost done. 2016-04-12 12:49:46 -07:00
Adam Ierymenko
4e4fd51117 boring doc stuff 2016-01-12 14:04:55 -08:00
Adam Ierymenko
451b8aa7b2 Query both root and network controller for multicast last resort GATHER. 2015-11-10 17:37:38 -08:00
Adam Ierymenko
21341ab15c Ready to test. 2015-11-09 09:45:43 -08:00
Adam Ierymenko
60ce886605 Tweak some timings for better reliability. 2015-11-02 15:15:20 -08:00
Adam Ierymenko
16bc3e0398 Factor out RemotePath subclass of Path -- no longer needed, just cruft. 2015-10-27 15:00:16 -07:00
Adam Ierymenko
f32e9d07dd Don't include COM if not necessary (fix). 2015-10-27 10:58:01 -07:00
Adam Ierymenko
2fa21aa676 . 2015-10-01 13:43:57 -07:00
Adam Ierymenko
3999e468b7 Need to hold nconf so *com does not die while being used. 2015-10-01 13:43:15 -07:00
Adam Ierymenko
6693149f3e Send COM with MULTICAST_GATHER for future use. 2015-10-01 13:34:12 -07:00
Adam Ierymenko
b11ffc9635 Integrate Hashtable into Multicaster, where @mwarning found heaviest std::map() overhead. 2015-08-27 16:17:21 -07:00
Adam Ierymenko
708aac1ea7 Remove some left over debug code, and fix attempt to send to self if we are an active bridge. 2015-07-28 11:43:09 -07:00
Adam Ierymenko
412389ec75 Implement ERROR_UNWATNED_MULTICAST 2015-07-07 11:49:38 -07:00
Adam Ierymenko
3f567a07ca Save a little bit of RAM by getting rid of overkill CMWC4096 non-crypto PRNG and replacing it with a simple non-crypto PRNG that just uses Salsa20. 2015-07-07 10:49:50 -07:00
Adam Ierymenko
3f71afd0fb Put multicast txQueue back to list. 2015-06-26 14:26:35 -07:00
Moritz Warning
def9cf2a6a replace vector::erase, was missed in a previous commit (ref #186) 2015-06-23 00:09:15 +02:00
Adam Ierymenko
7bae95836c Root server terminology cleanup, and tighten up a security check by checking full identity of peers instead of just address. 2015-06-19 10:23:25 -07:00
Adam Ierymenko
be4f08a548 Merge pull request #186 from mwarning/txQueue_vector
replace txQueue list by vector for faster memory access and less allo…
2015-06-18 15:42:12 -07:00
Moritz Warning
0073d0f694 replace txQueue list by vector for faster memory access and less allocations 2015-06-19 00:28:51 +02:00
Kees Bos
a425bbc673 Renamed supernode to rootserver 2015-05-06 12:05:20 +02:00
Adam Ierymenko
c894710ac1 Remove Logger.hpp references. 2015-04-08 16:00:48 -07:00
Adam Ierymenko
758bf949db Check for subscribed multicast groups should be able to check groups bridged behind me. 2015-04-06 19:34:36 -07:00
Adam Ierymenko
488f5bf977 More build fixes, and attic/ some stuff. 2015-04-06 15:14:54 -07:00
Adam Ierymenko
93012b0ee5 Re-incorporation: ZeroTier Networks -> ZeroTier, Inc. [Delaware] 2015-02-17 13:11:34 -08:00
Adam Ierymenko
4e95384ad6 Cleanup, add tristate to config code in Network, and happy new year! 2015-01-05 17:47:59 -08:00
Adam Ierymenko
149dbff3ea Windows Visual Studio meaningless-warning-ectomy. 2014-12-02 16:50:53 -08:00
Adam Ierymenko
04e4c5263e Remove more legacy code -- just doing the supernode redist for old multicast is now good enough given the small number of legacy nodes left. 2014-11-26 13:39:57 -08:00
Adam Ierymenko
4303376ba6 cleanup and docs 2014-11-26 13:30:00 -08:00
Adam Ierymenko
cda61fe2d9 docs and cleanup 2014-11-26 13:14:18 -08:00
Adam Ierymenko
15d3e383e6 Add ZT_SUPPORT_LEGACY_MULTICAST ifdef to enable the legacy code to all be toggled. 2014-11-25 12:46:51 -08:00
Adam Ierymenko
6888c6482c Re-enable legacy multicast distribution -- still too many pre1.0.0 nodes online. 2014-11-24 10:37:34 -08:00
Adam Ierymenko
d772639cc6 Multicast code cleanup. 2014-11-24 10:05:16 -08:00
Adam Ierymenko
acac88cf77 A few more tweaks to MC algo... 2014-11-23 14:00:27 -08:00
Adam Ierymenko
959f611a65 Fix thinko in multicast changes... works now! 2014-11-21 11:27:53 -08:00
Adam Ierymenko
7619b0ecbd Send multicasts in random order.
This should not affect most users, but on large networks it should cause service
announcements to work a lot better. This is the result of a prolonged discussion
with a user about the visibility of game servers on a large network. The old
multicast algorithm was de-facto randomized due to its distributed nature, while
the new algorithm is more deterministic. This will restore some randomization
beyond limit-overflow conditions.

It won't affect small networks at all.
2014-11-21 10:50:27 -08:00