From e8ae3334433216a43ba772f5b96350a29a92190f Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 23 Aug 2019 10:15:13 -0700 Subject: [PATCH 1/6] Version bumps, license fixed, and GitHub issue #990 take two --- debian/changelog | 7 +++++++ debian/copyright | 28 +++++++++++----------------- node/Membership.hpp | 34 ++++++++++++++++++++++++++++++++-- zerotier-one.spec | 7 +++++-- 4 files changed, 55 insertions(+), 21 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0bf2307a6..8dedcfe90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 23 Aug 2019 01:00:00 -0700 + zerotier-one (1.4.2-2) unstable; urgency=medium * See https://github.com/zerotier/ZeroTierOne for release notes. diff --git a/debian/copyright b/debian/copyright index cd728a0d4..493e6a27b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,21 +4,15 @@ Source: https://github.com/zerotier/ZeroTierOne Files: * Copyright: 2011-2016 ZeroTier, Inc. -License: GPL-3.0+ +License: ZeroTier BSL 1.1 -License: GPL-3.0+ - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see . - . - On Debian systems, the complete text of the GNU General - Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". +License: ZeroTier BSL 1.1 + Copyright (c)2019 ZeroTier, Inc. + + Use of this software is governed by the Business Source License included + in the LICENSE.TXT file in the project's root directory. + + Change Date: 2023-01-01 + + On the date above, in accordance with the Business Source License, use + of this software will be governed by version 2.0 of the Apache License. diff --git a/node/Membership.hpp b/node/Membership.hpp index f3e6d720b..e9fbd5406 100644 --- a/node/Membership.hpp +++ b/node/Membership.hpp @@ -181,8 +181,38 @@ private: inline bool _isV6NDPEmulated(const NetworkConfig &nconf,const MAC &m) const { return false; } inline bool _isV6NDPEmulated(const NetworkConfig &nconf,const InetAddress &ip) const { - if ((ip.isV6())&&(nconf.ndpEmulation())&&((InetAddress::makeIpv66plane(nconf.networkId,nconf.issuedTo.toInt()).ipsEqual(ip))||(InetAddress::makeIpv6rfc4193(nconf.networkId,nconf.issuedTo.toInt()).ipsEqual(ip)))) { - return true; + if ((ip.isV6())&&(nconf.ndpEmulation())) { + const InetAddress sixpl(InetAddress::makeIpv66plane(nconf.networkId,nconf.issuedTo.toInt())); + for(int i=0;isin6_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;isin6_addr.s6_addr)[j] != (((const struct sockaddr_in6 *)&rfc4193)->sin6_addr.s6_addr)[j]) { + prefixMatches = false; + break; + } + } + if (prefixMatches) + return true; + break; + } + } } return false; } diff --git a/zerotier-one.spec b/zerotier-one.spec index 6649e653e..d0daacf18 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -1,9 +1,9 @@ Name: zerotier-one -Version: 1.4.2 +Version: 1.4.4 Release: 2%{?dist} Summary: ZeroTier One network virtualization service -License: GPLv3 +License: ZeroTier BSL 1.1 URL: https://www.zerotier.com %if 0%{?rhel} >= 7 @@ -145,6 +145,9 @@ esac %endif %changelog +* Mon Aug 23 2019 Adam Ierymenko - 1.4.4-0.1 +- see https://github.com/zerotier/ZeroTierOne for release notes + * Mon Aug 04 2019 Adam Ierymenko - 1.4.2-0.1 - see https://github.com/zerotier/ZeroTierOne for release notes From 2f74bd5150569ea4251cd699f5cb249c59ffe530 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 23 Aug 2019 10:19:59 -0700 Subject: [PATCH 2/6] Add "make docker" for GitHub issue #1013 --- docker/Dockerfile | 8 ++++---- make-linux.mk | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0f0750c62..ae3eed6b6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,11 +4,11 @@ MAINTAINER Adam Ierymekno , Grant Limberg Date: Fri, 23 Aug 2019 10:31:12 -0700 Subject: [PATCH 3/6] Tolerate any libstdc++6 package "version" for Mint and other distros with weird versions on libstdc++6. --- debian/control | 2 +- debian/control.wheezy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 1eb147e09..910334c4a 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Homepage: https://www.zerotier.com/ Package: zerotier-one Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6 +Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6 (>= 1) Homepage: https://www.zerotier.com/ Description: ZeroTier network virtualization service ZeroTier One lets you join ZeroTier virtual networks and diff --git a/debian/control.wheezy b/debian/control.wheezy index a8e240847..a5140ebf6 100644 --- a/debian/control.wheezy +++ b/debian/control.wheezy @@ -10,7 +10,7 @@ Homepage: https://www.zerotier.com/ Package: zerotier-one Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, libstdc++6 +Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, libstdc++6 (>= 1) Homepage: https://www.zerotier.com/ Description: ZeroTier network virtualization service ZeroTier One lets you join ZeroTier virtual networks and From 51ebefc3ab1f377caf16e483d3a6c7b9ac8bb29f Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 23 Aug 2019 10:34:37 -0700 Subject: [PATCH 4/6] Ifdef these to stop non-Windows IDEs from complaining. --- windows/ZeroTierOne/ZeroTierOneService.cpp | 4 ++++ windows/ZeroTierOne/ZeroTierOneService.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/windows/ZeroTierOne/ZeroTierOneService.cpp b/windows/ZeroTierOne/ZeroTierOneService.cpp index c2d74fa1e..9b274d346 100644 --- a/windows/ZeroTierOne/ZeroTierOneService.cpp +++ b/windows/ZeroTierOne/ZeroTierOneService.cpp @@ -13,6 +13,8 @@ #pragma region Includes +#if defined(_WIN32) || defined(_WIN64) + #include #include #include @@ -150,3 +152,5 @@ void ZeroTierOneService::OnShutdown() // stop thread on system shutdown (if it hasn't happened already) OnStop(); } + +#endif diff --git a/windows/ZeroTierOne/ZeroTierOneService.h b/windows/ZeroTierOne/ZeroTierOneService.h index 142dd8afa..dbcd8c6de 100644 --- a/windows/ZeroTierOne/ZeroTierOneService.h +++ b/windows/ZeroTierOne/ZeroTierOneService.h @@ -13,6 +13,8 @@ #pragma once +#if defined(_WIN32) || defined(_WIN64) + #include #include "ServiceBase.h" @@ -64,3 +66,5 @@ private: ZeroTier::Mutex _lock; ZeroTier::Thread _thread; }; + +#endif From 43e98930e9d4652bfc1ca0afba7ced71923f0466 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 23 Aug 2019 11:12:25 -0700 Subject: [PATCH 5/6] distro cleanup --- debian/changelog | 2 +- debian/control | 4 ++-- zerotier-one.spec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8dedcfe90..83ae0c1dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,7 @@ 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 Thu, 23 Aug 2019 01:00:00 -0700 + -- Adam Ierymenko Fri, 23 Aug 2019 01:00:00 -0700 zerotier-one (1.4.2-2) unstable; urgency=medium diff --git a/debian/control b/debian/control index 910334c4a..52f8daea4 100644 --- a/debian/control +++ b/debian/control @@ -10,8 +10,8 @@ Homepage: https://www.zerotier.com/ Package: zerotier-one Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6 (>= 1) -Homepage: https://www.zerotier.com/ +Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6 +apt-caHomepage: https://www.zerotier.com/ Description: ZeroTier network virtualization service ZeroTier One lets you join ZeroTier virtual networks and have them appear as tun/tap ports on your system. See diff --git a/zerotier-one.spec b/zerotier-one.spec index d0daacf18..ccec532a6 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -145,7 +145,7 @@ esac %endif %changelog -* Mon Aug 23 2019 Adam Ierymenko - 1.4.4-0.1 +* Fri Aug 23 2019 Adam Ierymenko - 1.4.4-0.1 - see https://github.com/zerotier/ZeroTierOne for release notes * Mon Aug 04 2019 Adam Ierymenko - 1.4.2-0.1 From 6f9e3e3b787afc9be4223d94d3d98339fd9d4c6d Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 23 Aug 2019 11:14:17 -0700 Subject: [PATCH 6/6] Back out unnecessary hack --- debian/control.wheezy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control.wheezy b/debian/control.wheezy index a5140ebf6..a8e240847 100644 --- a/debian/control.wheezy +++ b/debian/control.wheezy @@ -10,7 +10,7 @@ Homepage: https://www.zerotier.com/ Package: zerotier-one Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, libstdc++6 (>= 1) +Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, libstdc++6 Homepage: https://www.zerotier.com/ Description: ZeroTier network virtualization service ZeroTier One lets you join ZeroTier virtual networks and