Merge dev

This commit is contained in:
Adam Ierymenko 2019-08-23 11:37:40 -07:00
commit c79360f58b
No known key found for this signature in database
GPG Key ID: 1657198823E52A61
9 changed files with 75 additions and 33 deletions

View File

@ -322,7 +322,7 @@ manpages: FORCE
doc: manpages doc: manpages
clean: FORCE clean: FORCE
rm -rf *.a *.so *.o node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(CORE_OBJS) $(ONE_OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest build-* ZeroTierOneInstaller-* *.deb *.rpm .depend debian/files debian/zerotier-one*.debhelper debian/zerotier-one.substvars debian/*.log debian/zerotier-one doc/node_modules ext/misc/*.o debian/.debhelper debian/debhelper-build-stamp rm -rf *.a *.so *.o node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(CORE_OBJS) $(ONE_OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest build-* ZeroTierOneInstaller-* *.deb *.rpm .depend debian/files debian/zerotier-one*.debhelper debian/zerotier-one.substvars debian/*.log debian/zerotier-one doc/node_modules ext/misc/*.o debian/.debhelper debian/debhelper-build-stamp docker/zerotier-one
distclean: clean distclean: clean
@ -331,6 +331,10 @@ realclean: distclean
official: FORCE official: FORCE
make -j4 ZT_OFFICIAL=1 all make -j4 ZT_OFFICIAL=1 all
docker: FORCE
make clean ; make -j4 one
docker build -f docker/Dockerfile .
central-controller: FORCE central-controller: FORCE
make -j4 LDLIBS="-L/usr/pgsql-10/lib/ -lpq -Lext/librabbitmq/centos_x64/lib/ -lrabbitmq" CXXFLAGS="-I/usr/pgsql-10/include -I./ext/librabbitmq/centos_x64/include -fPIC" DEFS="-DZT_CONTROLLER_USE_LIBPQ -DZT_CONTROLLER" ZT_OFFICIAL=1 ZT_USE_X64_ASM_ED25519=1 one make -j4 LDLIBS="-L/usr/pgsql-10/lib/ -lpq -Lext/librabbitmq/centos_x64/lib/ -lrabbitmq" CXXFLAGS="-I/usr/pgsql-10/include -I./ext/librabbitmq/centos_x64/include -fPIC" DEFS="-DZT_CONTROLLER_USE_LIBPQ -DZT_CONTROLLER" ZT_OFFICIAL=1 ZT_USE_X64_ASM_ED25519=1 one

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
zerotier-one (1.4.4) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
* License changed to BSL 1.1
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Fri, 23 Aug 2019 01:00:00 -0700
zerotier-one (1.4.2-2) unstable; urgency=medium zerotier-one (1.4.2-2) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes. * See https://github.com/zerotier/ZeroTierOne for release notes.

2
debian/control vendored
View File

@ -11,7 +11,7 @@ Homepage: https://www.zerotier.com/
Package: zerotier-one Package: zerotier-one
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6 Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6
Homepage: https://www.zerotier.com/ apt-caHomepage: https://www.zerotier.com/
Description: ZeroTier network virtualization service Description: ZeroTier network virtualization service
ZeroTier One lets you join ZeroTier virtual networks and ZeroTier One lets you join ZeroTier virtual networks and
have them appear as tun/tap ports on your system. See have them appear as tun/tap ports on your system. See

28
debian/copyright vendored
View File

@ -4,21 +4,15 @@ Source: https://github.com/zerotier/ZeroTierOne
Files: * Files: *
Copyright: 2011-2016 ZeroTier, Inc. Copyright: 2011-2016 ZeroTier, Inc.
License: GPL-3.0+ License: ZeroTier BSL 1.1
License: GPL-3.0+ License: ZeroTier BSL 1.1
This program is free software: you can redistribute it and/or modify Copyright (c)2019 ZeroTier, Inc.
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or Use of this software is governed by the Business Source License included
(at your option) any later version. in the LICENSE.TXT file in the project's root directory.
.
This package is distributed in the hope that it will be useful, Change Date: 2023-01-01
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the On the date above, in accordance with the Business Source License, use
GNU General Public License for more details. of this software will be governed by version 2.0 of the Apache License.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

View File

@ -4,11 +4,11 @@ MAINTAINER Adam Ierymekno <adam.ierymenko@zerotier.com>, Grant Limberg <grant.li
RUN yum update -y RUN yum update -y
RUN yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm RUN yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
RUN yum install -y bash postgresql10 libpqxx-devel RUN yum install -y bash postgresql10 libpqxx-devel librabbitmq
RUN yum clean all
RUN yum -y install epel-release && yum -y update && yum clean all
RUN yum -y install clang jemalloc jemalloc-devel
#RUN yum -y install epel-release && yum -y update && yum clean all
#RUN yum -y install clang jemalloc jemalloc-devel
ADD zerotier-one /usr/local/bin/zerotier-one ADD zerotier-one /usr/local/bin/zerotier-one
RUN chmod a+x /usr/local/bin/zerotier-one RUN chmod a+x /usr/local/bin/zerotier-one

View File

@ -184,14 +184,40 @@ private:
inline bool _isUnspoofableAddress(const NetworkConfig &nconf,const MAC &m) const { return false; } inline bool _isUnspoofableAddress(const NetworkConfig &nconf,const MAC &m) const { return false; }
inline bool _isUnspoofableAddress(const NetworkConfig &nconf,const InetAddress &ip) const inline bool _isUnspoofableAddress(const NetworkConfig &nconf,const InetAddress &ip) const
{ {
return ( if ((ip.isV6())&&(nconf.ndpEmulation())) {
(ip.ss_family == AF_INET6)&& const InetAddress sixpl(InetAddress::makeIpv66plane(nconf.networkId,nconf.issuedTo.toInt()));
(nconf.ndpEmulation())&& for(int i=0;i<nconf.staticIpCount;++i) {
( if (nconf.staticIps[i].ipsEqual(sixpl)) {
(InetAddress::makeIpv66plane(nconf.networkId,nconf.issuedTo.toInt()).ipsEqual(ip))|| bool prefixMatches = true;
(InetAddress::makeIpv6rfc4193(nconf.networkId,nconf.issuedTo.toInt()).ipsEqual(ip)) for(int j=0;j<5;++j) { // check for match on /40
) if ((((const struct sockaddr_in6 *)&ip)->sin6_addr.s6_addr)[j] != (((const struct sockaddr_in6 *)&sixpl)->sin6_addr.s6_addr)[j]) {
); prefixMatches = false;
break;
}
}
if (prefixMatches)
return true;
break;
}
}
const InetAddress rfc4193(InetAddress::makeIpv6rfc4193(nconf.networkId,nconf.issuedTo.toInt()));
for(int i=0;i<nconf.staticIpCount;++i) {
if (nconf.staticIps[i].ipsEqual(rfc4193)) {
bool prefixMatches = true;
for(int j=0;j<11;++j) { // check for match on /88
if ((((const struct sockaddr_in6 *)&ip)->sin6_addr.s6_addr)[j] != (((const struct sockaddr_in6 *)&rfc4193)->sin6_addr.s6_addr)[j]) {
prefixMatches = false;
break;
}
}
if (prefixMatches)
return true;
break;
}
}
}
return false;
} }
// This compares the remote credential's timestamp to the timestamp in our network config // This compares the remote credential's timestamp to the timestamp in our network config

View File

@ -13,6 +13,8 @@
#pragma region Includes #pragma region Includes
#if defined(_WIN32) || defined(_WIN64)
#include <WinSock2.h> #include <WinSock2.h>
#include <Windows.h> #include <Windows.h>
#include <stdio.h> #include <stdio.h>
@ -150,3 +152,5 @@ void ZeroTierOneService::OnShutdown()
// stop thread on system shutdown (if it hasn't happened already) // stop thread on system shutdown (if it hasn't happened already)
OnStop(); OnStop();
} }
#endif

View File

@ -13,6 +13,8 @@
#pragma once #pragma once
#if defined(_WIN32) || defined(_WIN64)
#include <stdio.h> #include <stdio.h>
#include "ServiceBase.h" #include "ServiceBase.h"
@ -64,3 +66,5 @@ private:
ZeroTier::Mutex _lock; ZeroTier::Mutex _lock;
ZeroTier::Thread _thread; ZeroTier::Thread _thread;
}; };
#endif

View File

@ -1,9 +1,9 @@
Name: zerotier-one Name: zerotier-one
Version: 1.4.2 Version: 1.4.4
Release: 2%{?dist} Release: 2%{?dist}
Summary: ZeroTier One network virtualization service Summary: ZeroTier One network virtualization service
License: GPLv3 License: ZeroTier BSL 1.1
URL: https://www.zerotier.com URL: https://www.zerotier.com
%if 0%{?rhel} >= 7 %if 0%{?rhel} >= 7
@ -145,6 +145,9 @@ esac
%endif %endif
%changelog %changelog
* Fri Aug 23 2019 Adam Ierymenko <adam.ierymenko@zerotier.com> - 1.4.4-0.1
- see https://github.com/zerotier/ZeroTierOne for release notes
* Mon Aug 04 2019 Adam Ierymenko <adam.ierymenko@zerotier.com> - 1.4.2-0.1 * Mon Aug 04 2019 Adam Ierymenko <adam.ierymenko@zerotier.com> - 1.4.2-0.1
- see https://github.com/zerotier/ZeroTierOne for release notes - see https://github.com/zerotier/ZeroTierOne for release notes