Commit Graph

167 Commits

Author SHA1 Message Date
Adam Ierymenko
f69454ec98 (1) Make ZT_ naming convention consistent (get rid of ZT1_), (2) Make local interface a full sockaddr_storage instead of an int identifier, which turns out to be better for multi-homing and other uses. 2015-09-24 16:21:36 -07:00
Adam Ierymenko
307e44f7c8 Two for one! (std::map removal) 2015-09-04 14:14:32 -07:00
Adam Ierymenko
d1341578d8 ... and another one! 2015-09-04 13:53:48 -07:00
Adam Ierymenko
7b8ce16057 Another std::map<> dies. 2015-09-04 13:42:19 -07:00
Adam Ierymenko
778c7e6e70 More cleanup to direct path push, comment fixes, etc. 2015-07-07 10:00:34 -07:00
Adam Ierymenko
f398952a6c Revert some bad docs in Packet -- I think we will still use that. Also rename addMembershipCertificate to more security-descriptive validateAndAddMembershipCertificate, give it a return value, and drop unused force parameter. 2015-07-07 08:14:41 -07:00
Adam Ierymenko
57c7992c78 GitHub issue #191 - kill intra-network multicast rate limits (which were not well supported or easily configurable anyway) -- this is really left over from the old collaborative multicast propagation algorithm. New algorithm (in for a while) has been sender-side replication in which sender "pays" all bandwidth, which intrinsically limits multicast. 2015-06-26 12:36:45 -07:00
Adam Ierymenko
5e3c6d9e0d Some nodeJS work, and apply fix from GitHub issue #166 plus a small optimization to avoid repeated calls to _allMulticastGroups(). 2015-05-25 14:21:05 -07:00
Adam Ierymenko
bdce679d84 Should fix deadlock issue in GitHub issue #166 2015-05-13 16:55:18 -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
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
67f1f1892f Bunch of tap stuff, IP address assignment hookups, etc. 2015-04-14 17:57:51 -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
bf2ff964e1 Utils::now() removal and a bunch of compile fixes. 2015-04-08 15:26:45 -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
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
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
647ce82b86 Move more stuff into osdep/ -- node/ will not use threads directly. 2015-03-31 15:23:14 -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
56f8f8aa24 Return self in GATHER requests if self is a member of multicast group, and reinstate legacy support. 2014-10-09 18:32:05 -07:00
Adam Ierymenko
d5e0f7e3e4 Reorg multicast packet, and a whole bunch of refactoring around the pushing of certificates of membership. 2014-10-09 12:42:25 -07:00
Adam Ierymenko
496109fdcc Announce multicast group changes on network rescanMulticastGroups() 2014-10-03 18:27:42 -07:00
Adam Ierymenko
aad344bb84 Add test network support to Network. 2014-10-03 16:14:34 -07:00
Adam Ierymenko
351db7f1a0 Plumb injectPacketFromHost through to API. 2014-10-03 14:49:11 -07:00
Adam Ierymenko
ae082c3cb8 Yay... now everything compiles! Getting close to testing on this. Still have not added backward compatibility support for relaying of multicasts to 0.9.X clients yet but that will be easy. Will test with heterogenous 1.0.0 clients only first. 2014-10-01 12:41:48 -07:00
Adam Ierymenko
b41437780b Add origin to new MULTICAST_FRAME, move security check for certs into Network to remove redundant code and bug-proneness, more work on IncomingPacket... 2014-09-30 17:26:34 -07:00
Adam Ierymenko
2659427864 Multicaster needs to be global, not per-network, and a bunch of other stuff. 2014-09-30 16:28:25 -07:00
Adam Ierymenko
8607aa7c3c Everything in for new multicast except IncomingPacket parsing... 2014-09-30 08:38:03 -07:00
Adam Ierymenko
2d41055bdc Some Network code cleanup. 2014-09-26 12:23:43 -07:00
Adam Ierymenko
050a0ce85d . 2014-09-25 15:08:29 -07:00
Adam Ierymenko
6c87f9f765 Rename MulticastTopology to Multicaster -- same name as old multicast controller but different code. More descriptive though. 2014-09-24 14:02:16 -07:00
Adam Ierymenko
81b12b6826 Rename the ubiquitous _r pointer to RuntimeEnvironment to RR just to be a little more consistent about using _ to denote private member variables. 2014-09-24 13:53:03 -07:00
Adam Ierymenko
557801a09e Rename PacketDecoder to much more descriptive IncomingPacket 2014-09-24 09:04:09 -07:00
Adam Ierymenko
9180a30986 . 2014-09-24 09:01:58 -07:00
Adam Ierymenko
61d0f27d2a Make MulticastTopology have its own mutex. 2014-09-23 10:26:30 -07:00
Adam Ierymenko
954f9cbc13 Yet more WIP on mulitcast algo... 2014-09-22 13:18:24 -07:00
Adam Ierymenko
d9abd4d9be Work on defining new direct broadcast multicast algorithm. 2014-09-18 18:28:14 -07:00
Adam Ierymenko
1d37204a37 Refactoring in progress... pardon our dust... 2014-09-12 16:57:37 -07:00
Adam Ierymenko
de4e29288d Fix for crazy Windows threading bug... repeatedly adding and removing a network now doesn't leave networks in limbo. 2014-08-21 17:49:05 -07:00
Adam Ierymenko
b80c229d87 Tons of code cleanup, refactor Network to use EthernetTapFactory, probably also fix GitHub issue #90 2014-07-31 14:09:32 -07:00
Adam Ierymenko
458f6ae7c3 Only add active bridges to top of MC propagation list if they are alive. Otherwise a dead active bridge might kill multicast for us. 2014-06-26 18:13:48 -07:00
Adam Ierymenko
45a1e048bb Add enabled/disabled status to network. 2014-06-26 17:05:07 -07:00
Adam Ierymenko
cf4700bc26 Simplify network briding modes -- we only need passive toggle and active bridge list, not three mode types. Also change isOpen to isPublic for terminology consistency. 2014-06-14 20:24:19 +00:00
Adam Ierymenko
08b7bb3c7a Network memory for bridge-side multicast groups that we learn - GitHub issue #68 2014-06-13 14:06:34 -07:00
Adam Ierymenko
c30f9832b0 Packet decoder work for EXT_FRAME for bridging - GitHub issue #68 2014-06-10 21:41:34 -07:00
Adam Ierymenko
d44e1349d8 Bridge routing table - GitHub issue #68 2014-06-10 17:18:59 -07:00
Adam Ierymenko
31ddc49da2 GitHub issue #67 2014-05-23 15:13:34 -07:00
Adam Ierymenko
ab5a460177 Apply multicast rate limits on a network to ourselves and do not send multicasts that would exceed limits, for GitHub issue #55 2014-03-25 21:38:54 -07:00
Adam Ierymenko
b5c3a92be2 Boring stuff: update dates in copyrights across all files. 2014-02-16 12:40:22 -08:00
Adam Ierymenko
3f912eb4ad Fix for GitHub issue #37: remember *nix device names. 2014-02-11 14:21:59 -08:00
Adam Ierymenko
2355fa973e Tiny compiler warning fix. 2014-01-29 18:27:02 -05:00
Adam Ierymenko
ffffc0179f Fix a couple compile items. 2014-01-27 23:16:15 -08:00
Adam Ierymenko
f80ec871f6 Make EthernetTap creation occur in a background thread in Network since it's a time consuming operation on Windows. This fixes one of the last remaining Windows problems. 2014-01-27 23:13:36 -08:00
Adam Ierymenko
612c17240a Dead code removal, fix for cleanup GitHub issue #28 2013-12-06 16:49:20 -08:00
Adam Ierymenko
942cc0ca21 Certificate of membership works now... had to fix multicast propagation so COM is pushed with multicast, which makes tremendous sense in retrospect. 2013-10-25 14:51:55 -04:00
Adam Ierymenko
010616e3ae Add some more TRACE output for certs. 2013-10-25 13:43:04 -04:00
Adam Ierymenko
5901972958 More tying up of certificate of membership stuff in the client. 2013-10-24 16:57:26 -04:00
Adam Ierymenko
5a8f213c23 Work in progress... 2013-10-18 12:01:48 -04:00
Adam Ierymenko
e6eb65be00 Netconf support for ARP and NDP caching TTLs. 2013-10-17 16:49:31 -04:00
Adam Ierymenko
46f868bd4f Lots of cleanup, more work on certificates, some security fixes. 2013-10-16 17:47:26 -04:00
Adam Ierymenko
58fa6cab43 Auto-pushing of membership certs on: MULTICAST_FRAME,FRAME,MULTICAST_LIKE and on receipt of MULTICAST_LIKE. 2013-10-07 17:00:53 -04:00
Adam Ierymenko
4d594b24bc Automagically push netconf certs -- Network support. 2013-10-07 16:13:52 -04:00
Adam Ierymenko
b4ae1adfbf Break out certificate of membership into its own class. 2013-10-07 15:29:03 -04:00
Adam Ierymenko
dcbc9c8ddd Rename error code for no membership certificate. 2013-10-07 15:21:40 -04:00
Adam Ierymenko
2fa2796f2a Another tweak, hopefully final, to reduce variance on identity generation times. 2013-10-07 14:31:13 -04:00
Adam Ierymenko
ea4e1136dd Flesh out membership certificate with signature, better serialize/deserialize, and rename parameter to qualifier to make better conceptual sense. 2013-10-04 12:24:21 -04:00
Adam Ierymenko
9db7939d38 Make new multicast depth and prefix bits parameters configurable. 2013-09-30 13:51:56 -04:00
Adam Ierymenko
4e010da54b Work in progress... 2013-09-26 17:45:19 -04:00
Adam Ierymenko
24bad9f3d1 More work in progress in new multicast propagation... 2013-09-25 17:41:49 -04:00
Adam Ierymenko
f3128a18fe Work in progress... 2013-09-25 10:55:27 -04:00
Adam Ierymenko
5557a8192d Work in progress... 2013-09-24 17:35:05 -04:00
Adam Ierymenko
bddbf4d276 Work in progress... 2013-09-24 12:44:15 -04:00
Adam Ierymenko
c26b64f24b Fix for netconf advertising of multicast propagation parameters, and defaults in Network.hpp. 2013-09-19 16:16:48 -04:00
Adam Ierymenko
f9079a110e Make network multicast breadth/depth parameters configurable on a per-net basis. 2013-09-17 16:11:57 -04:00
Adam Ierymenko
07e1085dcc More experimentation with multicast rate. 2013-09-12 17:27:10 -04:00
Adam Ierymenko
75471ee0e0 Small method rename. 2013-09-11 16:17:51 -04:00
Adam Ierymenko
5885c6186d More updates to bandwidth accounting. 2013-09-11 16:08:31 -04:00
Adam Ierymenko
9cdaefdb9a Drop old Certificate type from Network. 2013-09-11 15:13:05 -04:00
Adam Ierymenko
de744e6df6 Version two of network certificate of membership, a much more concise and fast approach. 2013-09-11 15:09:53 -04:00
Adam Ierymenko
3a563250f7 Finish stripping minBalance from BandwidthAccount 2013-09-10 14:13:04 -04:00
Adam Ierymenko
a3a2b8dedb Look up rate info from database, but going to drop min balance cause it seems unnecessary. Also work in progress on membership certs. 2013-09-10 09:40:37 -04:00
Adam Ierymenko
a40b8c07f4 Apply multicast rate limits to my own multicasts. Will run locally and on a variety of system types to test the result of this. 2013-09-07 15:49:38 -04:00
Adam Ierymenko
cdb96726df updateAndCheckMulticastBalance and friends 2013-09-07 12:23:53 -04:00
Adam Ierymenko
56d8bbf780 Bit more netconf cleanup... 2013-09-06 15:06:51 -04:00
Adam Ierymenko
37931d8589 Multicast bandwidth accounting work in progress, and some config field changes and cleanup. 2013-09-04 09:27:56 -04:00
Adam Ierymenko
f3ad05347e Improve code security posture by replacing sprintf with a safer function. 2013-08-30 17:05:43 -04:00
Adam Ierymenko
11774f7d5f Change rate limiter a little... 2013-08-30 14:15:24 -04:00
Adam Ierymenko
55616388ea Check network ethernet type whitelist instead of hard-coded ethernet types. 2013-08-28 16:01:27 -04:00
Adam Ierymenko
cd907a7662 More tap work -- DHCP configuration and such. 2013-08-27 15:55:32 -04:00
Adam Ierymenko
d6414c9ff7 Windows compiles! (w/Visual Studio 2012) That's about all it does, but it's a start. 2013-08-12 21:25:36 -04:00
Adam Ierymenko
95a23dc7ec Fix for another wonderful C++ threading race condition. 2013-08-09 17:20:40 -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
5cabb60a6f Actually report a meaningful network status instead of always OK 2013-08-08 10:41:17 -04:00