Commit Graph

826 Commits

Author SHA1 Message Date
Adam Ierymenko
196f27f1f0 Add delay to NAT-t escalation stuff to try to address GitHub issue #167 2015-05-22 13:11:55 -07:00
Adam Ierymenko
d9006712f6 Completely factor out "desperation" from the core. I thought of a significantly simpler way to move all of this logic entirely into the containing service, liberating the core from any concern over the nature of its pipe to the outside world. 2015-05-21 15:58:26 -07:00
Adam Ierymenko
1213073916 Apple auto-update stuff, now for Windows. 2015-05-20 19:38:49 -07:00
Adam Ierymenko
2810cd7c15 Build fixes for G++, building without SQLite3 present, and warning removal. 2015-05-17 23:56:47 +00:00
Adam Ierymenko
0bdd56ebd6 A few revisions to PFS design. 2015-05-15 09:04:39 -07:00
Adam Ierymenko
d0e0f5dd12 Basic OpenBSD compile fixes -- still need to update BSDEthernetTap, will do that later. Should be able to re-use FreeBSD port for OpenBSD, but we will see. 2015-05-15 08:48:53 -07:00
Adam Ierymenko
e94518590d First stab of PFS design work with PKC security -- may not implement in 1.0.3 but stubbing out. 2015-05-14 17:41:05 -07:00
Adam Ierymenko
a8835cd8b3 Some prep work to make room for perfect forward security (PFS). Will not affect existing clients. 2015-05-13 18:53:37 -07:00
Adam Ierymenko
bdce679d84 Should fix deadlock issue in GitHub issue #166 2015-05-13 16:55:18 -07:00
Kees Bos
a425bbc673 Renamed supernode to rootserver 2015-05-06 12:05:20 +02:00
Adam Ierymenko
845955dea5 Add definition for VERB_CMA -- GitHub issue #180 2015-06-13 18:08:00 +02:00
Adam Ierymenko
8aa68cd5f1 Add new fields in operator== 2015-06-13 13:13:19 +02:00
Adam Ierymenko
edbc5d3588 Gateways support in NetworkConfig object. 2015-06-13 13:06:49 +02:00
Adam Ierymenko
96a58becf8 Gateways support in network controller schema and database (not implemented yet in client) toward GitHub issue #178 2015-06-13 11:34:31 +02:00
Adam Ierymenko
40f312a827 When we reset within scope, erase the other entries for that scope so we won't keep resetting the same scope repeatedly. 2015-05-04 19:02:36 -07:00
Adam Ierymenko
18ca6f34ff Always update timestamp. 2015-05-04 18:45:39 -07:00
Adam Ierymenko
59fa687830 Make timeout also apply to null check in iam() 2015-05-04 18:43:24 -07:00
Adam Ierymenko
e922324bc6 Stop inlining all the Packet armor/dearmor stuff to reduce binary bloat. This stuff is called all over the place. 2015-05-04 18:39:53 -07:00
Adam Ierymenko
b4b067bf12 So we need to keep track of external surface per reporter, since some NATs assign different external IPs for each external destination. Keeping just one known surface could create a race condition. 2015-05-04 18:34:30 -07:00
Adam Ierymenko
da254d967f Hack around GitHub issue #165 (?) 2015-05-04 14:11:54 -07:00
Adam Ierymenko
9279bac385 Fix deadlock in SelfAwareness by deferring reconnects. 2015-04-30 21:09:41 -07:00
Adam Ierymenko
604576075e Add some missing includes that older G++ cares about. 2015-04-30 20:40:33 -07:00
Adam Ierymenko
d3820049b8 Add reported external address to OK(HELLO) TRACE to verify SN behavior. 2015-04-30 18:25:31 -07:00
Adam Ierymenko
9eb7698f0e Learn external IP addresses on OK(HELLO) too. 2015-04-30 16:40:04 -07:00
Adam Ierymenko
9a34fde8a5 Make sure identity.public exists and stays in sync, cleanup extra new in Node, and test script for local testnets. 2015-04-30 16:03:44 -07:00
Adam Ierymenko
a1005ca858 Do not unite() peers across different IP scopes as this would pretty much never work. 2015-04-26 16:03:16 -07:00
Adam Ierymenko
f5848972f9 Windows now builds and runs selftest correctly, and fixed a Windows (and possibly other platforms) issue in Phy<>. 2015-04-24 15:05:28 -07:00
Adam Ierymenko
54954f5b88 First pass of Windows cleanup and build fixes... 2015-04-24 13:35:17 -07:00
Adam Ierymenko
ddebe2d4c7 Network controller CRUD... :P 2015-04-21 16:41:35 -07:00
Adam Ierymenko
8a13cfdace Add per-network relays to NetworkConfig. 2015-04-20 17:14:16 -07:00
Adam Ierymenko
60f05518aa (1) now builds and works on Linux, (2) fix a threading problem causing carsh on shutdown, (3) cleanup in selftest, re-enable Phy and Http tests. 2015-04-20 15:12:31 -07:00
Adam Ierymenko
417f56de2f Add some TRACE instrumentation to external surface address awareness. 2015-04-17 12:19:01 -07:00
Adam Ierymenko
d2503172d8 Add some additional detail to the peer record in CAPI and JSON control plane. 2015-04-15 19:00:26 -07:00
Adam Ierymenko
ea1859541c More cleanup, and fix for the extremely unlikely case of identity collision. 2015-04-15 18:32:25 -07:00
Adam Ierymenko
f7b1437154 Putting the main binary back together... 2015-04-15 17:00:26 -07:00
Adam Ierymenko
6369c264e2 Rename netconf to controller and NetworkConfigMaster to NetworkController for consistency. 2015-04-15 15:12:09 -07:00
Adam Ierymenko
98bcc3d4b5 Disable a few noisy TRACEs, and limit how often we confirm new paths to avoid flooding. 2015-04-15 13:15:09 -07:00
Adam Ierymenko
1c9ca73065 Fix some deadlock issues, move awareness of broadcast subscription into core, other bug fixes. 2015-04-15 13:09:20 -07:00
Adam Ierymenko
c9af603b9f Add beacon broadcasting back into Node. 2015-04-14 18:20:03 -07:00
Adam Ierymenko
67f1f1892f Bunch of tap stuff, IP address assignment hookups, etc. 2015-04-14 17:57:51 -07:00
Adam Ierymenko
347e98dcd2 Just return files from listDirectory() since that is all we need, fix network request on network restore logic, and remember saved networks in service/One 2015-04-14 15:32:05 -07:00
Adam Ierymenko
49d31613b9 Fix some minor issues, now to reintegrate taps. 2015-04-14 15:16:04 -07:00
Adam Ierymenko
758b5caf94 Fix < logic. 2015-04-14 14:52:23 -07:00
Adam Ierymenko
6f4b30add8 Turns out you do have to unpack and compare sockaddr structures due to sin_len / sin6_len not present on all platforms and other junk. 2015-04-14 14:49:34 -07:00
Adam Ierymenko
1cfa67bbdd Bunch more control plane work, and shelve old UI -- React FTW. 2015-04-14 13:56:28 -07:00
Adam Ierymenko
a2605561af Basic control plane queries working. 2015-04-13 18:43:33 -07:00
Adam Ierymenko
b888e033c0 JSON control plane, almost done... 2015-04-13 18:12:45 -07:00
Adam Ierymenko
9e651b39e4 Add some TRACE around pinging (for now), and refactor service/One to just run in the foreground as some platforms may not require threads at all. 2015-04-10 11:40:45 -07:00
Adam Ierymenko
5e331d6733 Restrict unite() to desperation==0 since NAT-t only works right now with direct links. 2015-04-10 10:13:50 -07:00
Adam Ierymenko
068d311ecc TRACE compile fixes, other fixes, and it basically works! It says HELLO. 2015-04-09 20:54:00 -07:00
Adam Ierymenko
46ecad451c Starting on new service/ code to encapsulate node/ with osdep/ stuff, and add a user pointer to the CAPI. 2015-04-09 18:14:27 -07:00
Adam Ierymenko
7192fe6d15 osdep/ compile fixes, and remove some lingering OS-specific stuff from node/Defaults 2015-04-08 19:03:30 -07:00
Adam Ierymenko
ccc73b920e Node peer list function for CAPI, and some Peer cleanup. 2015-04-08 18:45:21 -07:00
Adam Ierymenko
d9e9b60a98 Node status and network list. 2015-04-08 18:25:40 -07:00
Adam Ierymenko
e34bc961db Add awareness of online status, and put old OS-dep utils in OSUtils. 2015-04-08 17:10:21 -07:00
Adam Ierymenko
0751eaabd8 Clean OS-dep stuff out of node/Utils. 2015-04-08 16:55:00 -07:00
Adam Ierymenko
4d5a6a25d3 Add events for packet decode errors, etc., and re-implement TRACE as an event. 2015-04-08 16:49:21 -07:00
Adam Ierymenko
9d9d0ef12c Rename StatusCallback to more descriptive EventCallback. 2015-04-08 16:07:47 -07:00
Adam Ierymenko
c894710ac1 Remove Logger.hpp references. 2015-04-08 16:00:48 -07:00
Adam Ierymenko
37bd6fdb9c Move Logger to attic -- last bit of OS-specific stuff to get out of core. 2015-04-08 15:56:11 -07:00
Adam Ierymenko
7529d050c7 All of node/ now compiles again! 2015-04-08 15:42:23 -07:00
Adam Ierymenko
bf2ff964e1 Utils::now() removal and a bunch of compile fixes. 2015-04-08 15:26:45 -07:00
Adam Ierymenko
ee2f51f48e Make Toplogy use dataStoreXX() methods from Node, and get rid of old TCP stuff. 2015-04-08 15:12:04 -07:00
Adam Ierymenko
40bfe37a19 Use max of core or most recent path desperation for pings. 2015-04-08 14:58:23 -07:00
Adam Ierymenko
59af674e74 Announce multicast groups on multicast subscribe. 2015-04-07 19:35:16 -07:00
Adam Ierymenko
6de7996218 Math fix. 2015-04-07 19:32:26 -07:00
Adam Ierymenko
49f031ccb4 Tons of refactoring, change to desperation algorithm to use max of core or link, porting over core loop code from old Node.cpp to new CAPI version, etc. 2015-04-07 19:31:11 -07:00
Adam Ierymenko
9e55f882d3 Starting to port from old Node() -- identity generation. 2015-04-07 16:41:56 -07:00
Adam Ierymenko
8210ed4805 Implement read from object store. 2015-04-07 14:11:47 -07:00
Adam Ierymenko
0a90681849 Add ping(), and a logic fix in SelfAwareness. 2015-04-07 12:32:05 -07:00
Adam Ierymenko
24608d5ca3 Always use HELLO to contact, and we now confirm newly learned paths via a two-way handshake to prevent half-connects. 2015-04-07 12:22:33 -07:00
Adam Ierymenko
eae2c89b09 Mutex locking fix. 2015-04-07 11:58:41 -07:00
Adam Ierymenko
52c3b7c34e Implemented empirical determination of external addressing, paritioned per scope. 2015-04-07 11:56:10 -07:00
Adam Ierymenko
817824b88b Some external surface awareness work, and IP scope classification. 2015-04-07 10:57:59 -07:00
Adam Ierymenko
a2821e9000 Add code to check external surface against reported surface from other trusted peers, and also rename ExternalSurface to SelfAwareness because lulz. 2015-04-06 20:17:21 -07:00
Adam Ierymenko
76ad19f411 Use binary_search for multicast groups, which are kept in sorted order. 2015-04-06 19:41:55 -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
4e691c8e22 build fixes 2015-04-06 18:56:08 -07:00
Adam Ierymenko
6807ccd710 Don't need to announce on multicast leave. 2015-04-06 18:28:18 -07:00
Adam Ierymenko
51f46a009a Multicast group join/leave and group membership announcement. 2015-04-06 18:27:24 -07:00
Adam Ierymenko
8001b2c0cb Network now calls port config function as per new API. 2015-04-06 16:52:52 -07:00
Adam Ierymenko
a86300c58f Network build fixes and cleanup of remaining internal references to _tap 2015-04-06 15:47:57 -07:00
Adam Ierymenko
488f5bf977 More build fixes, and attic/ some stuff. 2015-04-06 15:14:54 -07:00
Adam Ierymenko
197d272287 More NAT strategy cleanup. 2015-04-06 15:08:45 -07:00
Adam Ierymenko
be4683a96d Get rid of random port strategy -- research does not support. 2015-04-06 15:03:08 -07:00
Adam Ierymenko
5f351f2f6b build fixes. 2015-04-06 14:55:40 -07:00
Adam Ierymenko
f4fd2d4971 Bring IncomingPacket into line with new changes. 2015-04-06 14:50:53 -07:00
Adam Ierymenko
a95f1e1418 Eliminate redundant SharedPtr assignment. 2015-04-03 17:01:07 -07:00
Adam Ierymenko
6eb9289367 Bunch more cleanup, improvements to NAT traversal logic, finished updating Switch. 2015-04-03 16:52:53 -07:00
Adam Ierymenko
ee0f56355b Send path simplification. 2015-04-03 13:14:37 -07:00
Adam Ierymenko
a69e1876f1 The concept of link desperation (escalating to less desirable transports) simplifies a ton of stuff. Loads of spaghetti logic can die since we no longer have to make these decisions down in the core. 2015-04-02 17:54:56 -07:00
Adam Ierymenko
5f51653f9c More cleanup. 2015-04-01 19:16:07 -07:00
Adam Ierymenko
0214dbc277 More cleanup. 2015-04-01 19:15:21 -07:00
Adam Ierymenko
1f28ce3980 Tons more refactoring: simplify Network, move explicit management of Tap out, redo COM serialization, etc. 2015-04-01 19:09:18 -07:00
Adam Ierymenko
49349470a0 ... 2015-04-01 16:27:14 -07:00
Adam Ierymenko
8130848020 More refactoring... and update the API a bit... turns out my strategy for reducing indirect function calls also increased memcpy()s which are more expensive. This is simpler and faster. 2015-04-01 14:59:44 -07:00
Adam Ierymenko
7ff0cab1b7 docs 2015-03-31 18:33:39 -07:00
Adam Ierymenko
b723855751 Refactoring... lalalala... 2015-03-31 18:17:11 -07:00
Adam Ierymenko
36eab4f1a9 Whole heap more cleanup and refactoring... 2015-03-31 17:53:34 -07:00
Adam Ierymenko
647ce82b86 Move more stuff into osdep/ -- node/ will not use threads directly. 2015-03-31 15:23:14 -07:00