Commit Graph

1758 Commits

Author SHA1 Message Date
Adam Ierymenko
367ffde00c Plumb through localInterfaceId to track local interfaces corresponding with remote addresses. 2015-09-23 13:49:56 -07:00
Adam Ierymenko
4464fa5d39 Eliminate another warning. 2015-09-23 10:29:05 -07:00
Adam Ierymenko
86996d4315 Eliminate compiler warning. 2015-09-23 10:27:53 -07:00
Adam Ierymenko
d656e87395 Send a random small payload for NAT keepalives, since zero byte packets seem to fail to keep associations alive behind some NATs. 2015-09-22 15:58:00 -07:00
Adam Ierymenko
ddf3d1f949 Controller side support for IPv6 assignment. 2015-09-18 13:35:00 -07:00
Adam Ierymenko
3664966340 Generate local IPv6 addresses from network IDs and addresses. 2015-09-17 21:30:32 -07:00
Adam Ierymenko
610ab0750c Drop Sqlite-based Log table for now and switch to an in-memory log for recent activity. Log table gets too big on busy nodes. Should probably support push of events to some kind of event system later. 2015-09-15 10:59:23 -07:00
Adam Ierymenko
ef316ced3b Fix JSON. 2015-09-14 11:59:43 -07:00
Grant Limberg
f7d3e262a9 ifdef default assignments 2015-09-11 17:16:38 -07:00
Adam Ierymenko
cd005341c5 Extra statement to clean up Members -- cascade did not seem to work, possibly due to dual key. 2015-09-11 15:02:26 -07:00
Adam Ierymenko
c1a53a2653 ARP cache and responder agent code for use in netcon and iOS. 2015-09-11 11:45:04 -07:00
Adam Ierymenko
9dc2ef5549 Rename some stuff in Phy since it can be used with any stream socket. 2015-09-10 15:55:48 -07:00
Adam Ierymenko
cd3d77987c . 2015-09-10 15:52:24 -07:00
Adam Ierymenko
a35fa7ac93 Add expansion of netconf in _test field. 2015-09-10 15:14:10 -07:00
Adam Ierymenko
bebe3d7cfa Fix deadlock in test mode. 2015-09-10 14:47:04 -07:00
Adam Ierymenko
1f7a41cff8 Fix to allowing identity to be populated if not present. 2015-09-10 14:37:34 -07:00
Adam Ierymenko
9a723be263 Add socketpair support to Phy. 2015-09-10 13:18:57 -07:00
Adam Ierymenko
4fbcad2468 Allow identity to be populated for newly inserted Member objects to permit transfer from old network controller and testing. 2015-09-08 13:02:42 -07:00
Adam Ierymenko
0d386f1c31 Add a bit of useful testing instrumentation to SqliteNetworkController. 2015-09-08 11:35:55 -07:00
Adam Ierymenko
85b90f122a Final std::map<> from Switch, and add some smallish default values for hash size. 2015-09-04 15:35:43 -07:00
Adam Ierymenko
3dba016a93 Almost done... very few std::map<>s remaining in any spot that matters. 2015-09-04 15:21:22 -07:00
Adam Ierymenko
db0369e9b8 Remove way-overkill multimap from Switch. 2015-09-04 14:56:39 -07:00
Adam Ierymenko
0ab3e49be9 Starting in on Switch... kill map in defrag queue, which will probably improve performance pretty decently under high load with lots of peers. 2015-09-04 14:44:22 -07:00
Adam Ierymenko
f116c4b9c0 ... and another ... 2015-09-04 14:24:31 -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
3a959a7763 Swap out std::map<> for Hashtable<> for main peer database in Topology. (ongoing std::map-ectomy) 2015-09-04 12:14:21 -07:00
Adam Ierymenko
cfd101c9b8 Add entries() to go with keys() for future use. 2015-09-04 11:50:12 -07:00
Adam Ierymenko
da9a720c3f Hash table bug fix, and add copy constructor and assignment operator for principle of least surprise. 2015-09-03 17:33:06 -07:00
Adam Ierymenko
4838cbc350 Unix domain sockets in Phy<> 2015-09-02 14:32:01 -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
3947807b1f A simple and fast Hashtable, tested but not yet integrated with anything. 2015-08-27 15:36:13 -07:00
Adam Ierymenko
5db538d85e VERSION 1.0.5: Windows and Linux (upgrade) bug fixes
Version 1.0.5 is a very minor release. It includes a new build of the Windows
device driver that supports Windows Vista and 2008 Server, and a fix to prevent
an issue that could occur when updating Linux installations from old pre-1.0.3
versions to 1.0.3 or 1.0.4.

It also includes a few very minor fixes and improvements to the controller code,
which doesn't affect most users.

This second commit just bumps version.h. :)
2015-08-25 09:55:14 -07:00
Adam Ierymenko
a9176d7b62 VERSION 1.0.5: Windows and Linux (upgrade) bug fixes
Version 1.0.5 is a very minor release. It includes a new build of the Windows
device driver that supports Windows Vista and 2008 Server, and a fix to prevent
an issue that could occur when updating Linux installations from old pre-1.0.3
versions to 1.0.3 or 1.0.4.

It also includes a few very minor fixes and improvements to the controller code,
which doesn't affect most users.
2015-08-25 09:47:37 -07:00
Adam Ierymenko
b4487cefc9 Document rules requirement in controller. 2015-08-25 09:46:59 -07:00
Adam Ierymenko
867258de8b Document clock convenience field. 2015-08-25 09:44:21 -07:00
Adam Ierymenko
5fcef91278 Ignore old root-topology if present -- fix for upgrading on Linux and possibly elsewhere. 2015-08-25 09:42:37 -07:00
Adam Ierymenko
2aa1b5d9b7 Add clock helper field to both member and network to permit time duration calculation easily. 2015-08-24 12:44:07 -07:00
Adam Ierymenko
9a5be0a092 typo 2015-08-24 11:24:33 -07:00
Adam Ierymenko
4da794b389 Add authorizedMemberCount to controller network config records. 2015-08-19 11:43:56 -07:00
Adam Ierymenko
0a5429cab0 Lookup of member must be a left outer join in case the member is being manually inserted before we see the node. 2015-08-17 21:08:02 +00:00
Adam Ierymenko
b75bdedaee Manually set DeviceInstanceID since this registry key is missing on Windows Vista and Server 2008. 2015-08-13 15:52:54 -07:00
Adam Ierymenko
085734aaba Windows driver (NDIS6) rebuild using earlier DDK revision to allow driver to load in Windows 2008 Server and Windows Vista. Still issues with those platforms, but driver loads -- and shouldn't hurt newer versions (will test). 2015-08-13 15:18:48 -07:00
Adam Ierymenko
bf193dd3cf VERSION 1.0.4: Stability, LAN, and NAT traversal improvements
ZeroTier One version 1.0.4 brings several improvements to stability,
connectivity between hosts on the same LAN, and NAT traversal.

Direct connectivity improvements:

 - ZeroTier One now opens port mappings using uPnP and/or NAT-PMP
   if they are available on your network. These are then made
   available to other (1.0.4 or newer) nodes. This should greatly
   improve direct connectivity success rates for users on networks
   that support port mapping. To build with this option, you must
   include ZT_USE_MINIUPNPC=1 on the make path. Pre-build binaries
   are included for many common architectures to make this easier.

 - A new message has been introduced whereby nodes can "push" IP
   address suggestions to other nodes. This is only done to nodes
   with whom you have a trust relationship, which right now means
   they are members of a network you've joined. The IP addresses
   sent include local interface addresses and possibly uPnP mappings
   if any are available. When nodes receive pushed IPs, they can
   attempt connectivity at these addresses. This greatly improves
   connectivity on local LANs, since the old broadcast mechanism
   proved too unreliable under many real world scenarios.

 - IPv6 addresses are also "pushed" via the aforementioned message,
   allowing direct connectivity over IPv6 if both hosts have an
   IPv6 address.

 - Some of the aggressive port-scanning NAT-t behavior has been
   removed, since this occasionally triggered intrusion alarms on
   some networks and proved ineffective in the field. uPnP will be
   a much bigger win, and is less "hacky."

 - The rate of (tiny) UDP keepalive packet generation was slightly
   increased. We were as surprised as you to learn that there are
   many NAT routers in the wild with timeouts as short as 20 seconds
   even though the RFC stipulates that they should be no shorter
   than two minutes (120 seconds).

All of these connectivity improvements rely upon a new message
introduced with 1.0.4, so they'll only work between 1.0.4 nodes.
Older methods of connectivity establishment will continue to work
with earlier versions.

Platform-specific improvements:

 - Many improvements have been made to Windows support and stability.
   The NDIS6 driver is now used exclusively. If you have ports that
   use NDIS5, these will automatically be re-created using the NDIS6
   driver. You may see a "select this network's type" notification
   after 1.0.4 upgrade for this reason.

 - The dependency on the external "devcon.exe" binary on Windows has
   been completely removed in favor of internal direct calls to the
   Windows setup API to add and remove network ports. These are done
   via dynamically loaded instances of the system setup DLLs to use
   the most recent setup API code on your system for improved
   compatibility.

 - This version is tested with Windows 10 release, and was confirmed
   to work on a clean install.

 - The ARM32/Raspbian build is now back to using Debian Wheezy for
   library backward compatibility (binary build only).

 - The Mac icon is now a bit smaller to look better in the dock.

 - The ui/ subfolder is now distributed with the Linux binary installer
   and packages. This means Linux users can navigate to the UI at
   http://127.0.0.1:9993/ and enter their authtoken.secret to use
   the GUI locally. (This port could also be accessed via SSH port
   forwarding or other mechanisms to administrate graphically from a
   remote system.)

Other improvements:

 - The new beta SQLite-backed controller microservice found in
   controller/ and built with the ZT_ENABLE_NETWORK_CONTROLLER=1 make
   option is now in a much more "working" state. Feel free to give
   it a try! If you tried it before, delete controller.db before
   starting the new version.

 - A few tweaks were made to the path selection logic in the hope of
   eliminating some flaky network behavior reported by users.

The next version of ZeroTier One will focus on performance and memory
footprint reduction, and may also include perfect forward security/secrecy
(a.k.a. PFS) once our design is finalized and reviewed.
2015-07-31 11:33:52 -07:00
Adam Ierymenko
facb009a1d Add security notice to auto-update info in -h output, and fix a missing paren. 2015-07-31 09:50:55 -07:00
Adam Ierymenko
8d09c37140 Remove a bit of redundant logic, and also announce MULTICAST_LIKEs to controllers (for future use). 2015-07-31 09:37:13 -07:00
Adam Ierymenko
f6ced547be Dead code removal. 2015-07-31 08:56:31 -07:00
Adam Ierymenko
c826cec1d4 Bring back _winPokeAHole() to dynamically allocate firewall exception. Shouldn't be needed but seems to help on Windows 8. 2015-07-30 17:52:35 -07:00
Adam Ierymenko
620562f7cf Because Windows, because Windows. Now it upgrades correctly from 1.0.1, including automatic driver update from NDIS5 to NDIS6. Also a bit more robust on creating new ports, just in case. 2015-07-30 17:00:57 -07:00