Commit Graph

1698 Commits

Author SHA1 Message Date
Adam Ierymenko
67acba4bc9 Stop using RAND_ in libcrypto for Utils::getSecureRandom() due to annoying valgrind spew from libcrypto use of uninitialized RAM as a random source. Might look into replacing RAND_ in libcrypto with our own simple /dev/urandom / Windows CAPI plugin. 2013-08-10 10:12:16 -04:00
Adam Ierymenko
9979474f1e Add range safety check to EllipticCurveKey. 2013-08-09 20:45:15 -04:00
Adam Ierymenko
95a23dc7ec Fix for another wonderful C++ threading race condition. 2013-08-09 17:20:40 -04:00
Adam Ierymenko
7c3a446499 Tweak default multicast rate limits. 2013-08-09 17:02:06 -04:00
Adam Ierymenko
6a24ac4f00 Add a concept of debt to RateLimiter, save a bit of RAM. 2013-08-09 16:36:58 -04:00
Adam Ierymenko
3af55f4423 Add RateLimiter for rate limiting multicast, not tested yet. 2013-08-08 17:20:35 -04:00
Adam Ierymenko
95c0790a88 Back off a little on multicast propagation depth. Eventually this will be a network parameter. 2013-08-08 12:55:01 -04:00
Adam Ierymenko
5cabb60a6f Actually report a meaningful network status instead of always OK 2013-08-08 10:41:17 -04:00
Adam Ierymenko
86056fdbd9 Generalize unlink to OS-dep code in Utils, just a little prep for Windows port. 2013-08-08 10:06:39 -04:00
Adam Ierymenko
8a46452a70 Move template parameter in Thread to a more logical scope location. 2013-08-08 09:19:36 -04:00
Adam Ierymenko
e98fd3dba0 Add code to automatically join Earth if no network memberships are defined. 2013-08-07 14:19:50 -04:00
Adam Ierymenko
f5717f4427 Fix a bug and wow, it works. 2013-08-07 11:55:55 -04:00
Adam Ierymenko
5f8a3f4a7f More detail and output improvements to command bus "listpeers," and a little cleanup. 2013-08-06 11:50:56 -04:00
Adam Ierymenko
499ac2699f Bit of comment and if nesting cleanup in PacketDecoder. 2013-08-06 10:39:20 -04:00
Adam Ierymenko
b342f56bec Network constructor deuglification, remove unused old encrypt/decrypt methods from Identity. 2013-08-06 10:15:05 -04:00
Adam Ierymenko
28a73b620e Bunch more debugging and loop closing on new netconf. 2013-08-06 01:28:56 -04:00
Adam Ierymenko
e73c4cb68b Whole bunch of stuff: netconf, bug fixes, tweaks to ping and firewall opener timing code. 2013-08-06 00:05:39 -04:00
Adam Ierymenko
c9c63074bb CLI communication now working. 2013-08-05 17:44:39 -04:00
Adam Ierymenko
a7c4cbe53a CLI debugging, got rid of nasty old Thread class and replaced with newer cleaner portable idiom. 2013-08-05 16:06:16 -04:00
Adam Ierymenko
3368330b77 Poll for network autoconf, and a few other documentation changes. 2013-08-05 12:34:54 -04:00
Adam Ierymenko
b9aeec9f29 Documentation improvements and some very minor pre-emptive security stuff. 2013-08-05 12:16:25 -04:00
Adam Ierymenko
bf5c07f79a Scratch that... more work wiring up netconf. Got to handle OK. 2013-08-03 12:53:46 -04:00
Adam Ierymenko
80d8b7d0ae Netconf wired up, ready to test. 2013-08-02 17:17:34 -04:00
Adam Ierymenko
f823fd05ac Replace fork() with vfork() in tap config, faster. 2013-08-02 14:38:53 -04:00
Adam Ierymenko
2a6b74746e Netconf service itself works, time to integrate. 2013-08-02 14:25:23 -04:00
Adam Ierymenko
741642ba53 netconf service work 2013-08-01 17:32:37 -04:00
Adam Ierymenko
ee9a811b81 Netconf service code, interacts with our MySQL database. 2013-08-01 10:11:59 -04:00
Adam Ierymenko
f260c2839c Local service plugin stuff... work in progress. 2013-07-31 17:24:59 -04:00
Adam Ierymenko
2ba97fb46b Remove suicidalThread hack from Thread. 2013-07-31 10:06:59 -04:00
Adam Ierymenko
9df88a3933 Change mind again... dump Http. Launcher will do this and will use libcurl. Also fix some format string errors. 2013-07-31 10:05:00 -04:00
Adam Ierymenko
3daea24d50 Little bit of protocol changes before implementation of new verbs. 2013-07-31 09:27:55 -04:00
Adam Ierymenko
7e156b2622 Call clean on all networks periodically, generalize Topology clean cycle to an overall clean cycle. 2013-07-30 11:14:53 -04:00
Adam Ierymenko
e4c5ad9f43 More work on network membership certs, and it builds now. Still in heavy development. 2013-07-29 17:11:00 -04:00
Adam Ierymenko
439e602d5a Fix a bunch of errors due to minor method signature changes, still a work in progress. 2013-07-29 16:18:29 -04:00
Adam Ierymenko
a53cfc9096 Network membership certificate work in progress... does not build yet. 2013-07-29 13:56:20 -04:00
Adam Ierymenko
304ed641fe makekeypair utility 2013-07-27 16:26:06 -04:00
Adam Ierymenko
7a17f6ca80 Add skeleton of certificate-based private network authentication. Also remove some old code. 2013-07-27 16:20:08 -04:00
Adam Ierymenko
dd203f0065 Revert removal of Http. Witness my indecisiveness. 2013-07-27 15:45:01 -04:00
Adam Ierymenko
fb975ead23 Add simple key=value dictionary, sorta like java.util.Properties. 2013-07-27 15:09:51 -04:00
Adam Ierymenko
a816f56426 Dump huffman, doesnt add much and complicates porting to other languages. Also fix compile error in idtool. 2013-07-27 14:01:19 -04:00
Adam Ierymenko
e6e825da70 Get rid of built-in HTTP. If we do HTTP it will probably be via libcurl to support HTTPS and chunking and other complexities. 2013-07-27 13:54:59 -04:00
Adam Ierymenko
917b95a1d6 cleanup 2013-07-27 13:40:56 -04:00
Adam Ierymenko
b0a83093ce Back out of RPC... blech. Have a better idea. 2013-07-27 13:36:27 -04:00
Adam Ierymenko
57d8730f1b Wire up RPC plugin loading to Node. 2013-07-25 17:53:57 -04:00
Adam Ierymenko
af8fcac0fc RPC infrastructure work in progress. 2013-07-25 15:19:35 -04:00
Adam Ierymenko
9cf734b74a Sane-ify Address, get rid of goofy union thingy. 2013-07-25 13:24:39 -04:00
Adam Ierymenko
083ae2d097 Work in progress on RPC. 2013-07-25 12:55:31 -04:00
Adam Ierymenko
668c428051 Basic RPC stuff in Packet and PacketDecoder for RPC service support. 2013-07-23 22:46:04 -07:00
Adam Ierymenko
10fc164fcb More trace output to debug control bus. 2013-07-23 17:21:34 -07:00
Adam Ierymenko
0c7f8e247c Add amSupernode to make code clearer in the check-if-self-is-supernode case. 2013-07-23 10:23:55 -07:00
Adam Ierymenko
b8e9a79d00 docs 2013-07-20 18:24:56 -04:00
Adam Ierymenko
e4e517e9c3 Doc cleanup. 2013-07-18 18:07:43 -04:00
Adam Ierymenko
5f4eb1ebc6 Command line interface. 2013-07-18 16:35:52 -04:00
Adam Ierymenko
c345c699fd Self test for command bus encode/decode. 2013-07-18 13:27:46 -04:00
Adam Ierymenko
a677597b44 Better encode/decode code for control bus. 2013-07-18 11:43:46 -04:00
Adam Ierymenko
1fce55fab1 Add an echoed 32-bit token field to command packets. 2013-07-17 17:35:19 -04:00
Adam Ierymenko
2e85cf18c1 Cleanup and build fixes. 2013-07-17 14:39:34 -04:00
Adam Ierymenko
76bc9968ff New simpler command interface via loopback UDP protected by a crypto token. 2013-07-17 14:10:44 -04:00
Adam Ierymenko
557cc359b3 More filter work. 2013-07-17 10:01:46 -04:00
Adam Ierymenko
102b0865cb Filter work, adding toString() and main evaluation function. 2013-07-16 15:00:15 -04:00
Adam Ierymenko
a793dc2b29 Small updates to documentation, a few precautionary fixes. 2013-07-15 09:06:59 -04:00
Adam Ierymenko
a6f4de8172 Also exclude upstream when picking supernode for multicast propagation, to not bounce back and forth to the same supernode. 2013-07-15 08:00:15 -04:00
Adam Ierymenko
ca83f07b54 Simpler variant on multicast propagation algorithm seems to perform better by being less deterministic. May also be faster. 2013-07-13 15:17:21 -04:00
Adam Ierymenko
195ded4608 Cleanup, comments, regularize TRACE messages. 2013-07-13 14:45:39 -04:00
Adam Ierymenko
97cbd98bc5 Compile fixes, integration of fast PRNG. 2013-07-13 14:28:26 -04:00
Adam Ierymenko
3e49337d9a Add a fast non-cryptographic PRNG. 2013-07-13 13:26:27 -04:00
Adam Ierymenko
c6dd5b239f Minor improvement to multicast propagation algorithm. 2013-07-12 22:54:39 -04:00
Adam Ierymenko
aa59c1de10 Bunch of little bug fixes in newly refactored code. 2013-07-12 22:07:48 -04:00
Adam Ierymenko
a004878546 Update bloom filter for MULTICAST_FRAME retransmit, and temporarily add abort() to catch gremlin 2013-07-12 17:21:23 -04:00
Adam Ierymenko
086050686f Merge branch 'adamierymenko-dev' of 10.211.55.2:/Users/api/Code/local-ZeroTierOne into adamierymenko-dev 2013-07-12 16:43:08 -04:00
Adam Ierymenko
f934b81703 Several bug fixes in newly refactored code. 2013-07-12 16:40:59 -04:00
Adam Ierymenko
77fd78d5c9 Little cleanup and docs. 2013-07-12 10:13:24 -04:00
Adam Ierymenko
a86e1cdb88 A bit more minor cleanup before testing. 2013-07-11 22:45:12 -04:00
Adam Ierymenko
2510f594e5 It builds now. The Switch object has been put on a diet. Now to test on the testnet before merge to master. 2013-07-11 22:25:12 -04:00
Adam Ierymenko
339b2314ea More work in progress on Switch / PacketDecoder refactor. 2013-07-11 22:06:25 -04:00
Adam Ierymenko
fd2b383c3e Work in progress... 2013-07-11 18:15:51 -04:00
Adam Ierymenko
ae93c95151 More major Switch refactor work... still in progress. 2013-07-11 17:52:04 -04:00
Adam Ierymenko
ffad0b2780 Factoring out packet decoder from Switch to put that object on a little bit of a diet. Work in progress, wont build yet. 2013-07-11 16:19:06 -04:00
Adam Ierymenko
bcd079b70e Adding signatures to multicast frames, work in progress, does not build yet 2013-07-10 22:58:43 -04:00
Adam Ierymenko
9e28bbfbb2 Factored out multicast propagation algorithm from Switch and Topology, also cleaned up and clarified it a bit. 2013-07-10 17:24:27 -04:00
Adam Ierymenko
47f611e7b8 Add bloom filter as separate code, work in progress factoring out multicast algorithm from the bloated Switch class. 2013-07-09 22:24:50 -04:00
Adam Ierymenko
a20b540fb0 Small compiler warning fix 2013-07-09 14:11:57 -04:00
Adam Ierymenko
ef3e319c64 Several things:
(1) Probable fix for issue #7 and major cleanup of EthernetTap code with consolidation for all unix-like systems and specialization for different flavors only when needed.

(2) Refactor of Buffer<> to make its members private, and Packet to use Buffer's methods exclusively to access them. This improves clarity and means we're no longer lying about Buffer's role in the code's security posture.

(3) Add -fstack-protect to Makefile to bounds check stack variables.
2013-07-09 14:06:55 -04:00
Adam Ierymenko
41cd980bf7 Further increase verbosity of TRACE messages for duplicate multicasts 2013-07-09 10:13:13 -04:00
Adam Ierymenko
775fef9ce9 Silly multicast propagation fix: exclude upstream sender to never send duplicate multicasts back to where they came from 2013-07-08 20:53:05 -04:00
Adam Ierymenko
6eb77da094 Fix for issue #6: OSX tap device forgets it has IPv6 2013-07-08 20:36:33 -04:00
Adam Ierymenko
366f556e5b Filter work 2013-07-08 20:05:29 -04:00
Adam Ierymenko
e7f20ad5f9 More filter development. It builds but is not integrated with the rest of the code. 2013-07-08 19:52:40 -04:00
Adam Ierymenko
f8cfdf973e More filter work, and doc updates 2013-07-08 00:21:43 -04:00
Adam Ierymenko
e2a2d33f8f Filter code, work in progress, wont build yet 2013-07-07 19:36:57 -04:00
Adam Ierymenko
3397273322 Increase verbosity of TRACE messages for dropped duplicate multicast frames to help debug multicast propagation 2013-07-06 22:18:19 -04:00
Adam Ierymenko
ef08494237 Send HELLO instead of NOP for NAT-t in order to measure latency always. Also prevents a race that can cause the first NAT-t to fail where the NOP arrives before the WHOIS reply from the supernode. Now NAT-t initiators will push their own public keys anyway so that doesnt matter. 2013-07-06 16:20:35 -04:00
Adam Ierymenko
2eaac3891e Enable ff:ff:ff:ff:ff:ff w/no ADI a.k.a. broadcast. YOLO. 2013-07-06 15:56:12 -04:00
Adam Ierymenko
7c85a638b0 Added creation and periodic update of a file called "status" in the home directory that contains peer link status. Useful for debugging and statistics. Send it SIGHUP to force an update now. Otherwise it updates every 120 seconds. 2013-07-06 14:58:34 -04:00
Adam Ierymenko
2c0cdc9484 Fix for failure to bind port if IPv6 is not enabled on a system -- it should succeed if it can bind either V4 or V6 or both and only fail if neither binds 2013-07-06 13:43:24 -04:00
Adam Ierymenko
cfef114c31 Possible fix for issue #4 - segfault in ___removeIp helper function in EthernetTap on OSX -- I think the problem may have been that I was using set::erase(key) while also using an iterator, so now it uses erase(iterator). See if it happens again, cause I could not duplicate the issue. Possible minor difference in STL version. 2013-07-06 13:34:35 -04:00
Adam Ierymenko
b1adaf5902 Fix Linux build problem 2013-07-04 17:10:19 -04:00
Adam Ierymenko
150850b800 New git repository for release - version 0.2.0 tagged 2013-07-04 16:56:19 -04:00