From 86a96e5bf1b207a8b1aa925e1d9f73ce834505b8 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 21 Jul 2017 16:11:16 -0700 Subject: ZeroTier transport implementation (work funded by Capitar IT Group BV) The ZeroTier transport is experimental at this point, and not enabled by default. It does not work with Windows yet (the Windows platform needs UDP support first.) Configure with -DNNG_ENABLE_ZEROTIER=yes -DNNG_ZEROTIER_SOUCE= The must point to a dev branch of the ZeroTierOne source tree, checked out, and built with a libzerotiercore.a in the top directory, and a ZeroTierOne.h header located at include. The build will add -lc++ to the compile, as the ZeroTier core functionality is written in C++ and needs some runtime support (e.g. new, delete, etc.) --- src/platform/posix/posix_udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platform') diff --git a/src/platform/posix/posix_udp.c b/src/platform/posix/posix_udp.c index 552730da..05f7bea1 100644 --- a/src/platform/posix/posix_udp.c +++ b/src/platform/posix/posix_udp.c @@ -210,7 +210,7 @@ nni_plat_udp_open(nni_plat_udp **upp, nni_sockaddr *bindaddr) } // UDP opens can actually run synchronously. - if ((udp = NNI_ALLOC_STRUCT(udp)) != NULL) { + if ((udp = NNI_ALLOC_STRUCT(udp)) == NULL) { return (NNG_ENOMEM); } nni_mtx_init(&udp->udp_mtx); -- cgit v1.2.3-70-g09d2