diff --git a/.gitignore b/.gitignore index 173920d18..cca0cd643 100755 --- a/.gitignore +++ b/.gitignore @@ -124,3 +124,16 @@ workspace/ workspace2/ zeroidc/target/ tmp/ + +#snapcraft specifics +/parts/ +/stage/ +/prime/ + +*.snap + +.snapcraft +__pycache__ +*.pyc +*_source.tar.bz2 +snap/.snapcraft \ No newline at end of file diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 22bf76dd1..ffe03aea3 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,6 +1,13 @@ ZeroTier Release Notes ====== +# 2021-11-08 -- Version 1.8.2 + + * Fix multicast on linux. + * Fix a bug that could cause the tap adapter to have the wrong MAC on Linux. + * Update build flags to possibly support MacOS older than 10.14, but more work needs to be done. It may not work yet. + * Fix path variable setting on Windows. + # 2021-10-28 -- Version 1.8.1 * Fix numerous UI issues from 1.8.0 (never fully released). diff --git a/debian/changelog b/debian/changelog index ce6a6d48c..a6a24d9b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +zerotier-one (1.8.2) unstable; urgency=medium + + * See RELEASE-NOTES.md for release notes. + + -- Adam Ierymenko Mon, 08 Nov 2021 01:00:00 -0700 + zerotier-one (1.8.1) unstable; urgency=medium * See RELEASE-NOTES.md for release notes. diff --git a/ext/installfiles/mac/ZeroTier One.pkgproj b/ext/installfiles/mac/ZeroTier One.pkgproj index 60b30ca45..55961ddc7 100755 --- a/ext/installfiles/mac/ZeroTier One.pkgproj +++ b/ext/installfiles/mac/ZeroTier One.pkgproj @@ -701,7 +701,7 @@ USE_HFS+_COMPRESSION VERSION - 1.8.1 + 1.8.2 TYPE 0 diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index 8f220d1f6..4542e8c2e 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -26,10 +26,10 @@ - + - + @@ -64,7 +64,7 @@ - + @@ -330,7 +330,7 @@ - + @@ -510,7 +510,7 @@ - + diff --git a/java/jni/Android.mk b/java/jni/Android.mk index b60fe65e6..952bc4328 100644 --- a/java/jni/Android.mk +++ b/java/jni/Android.mk @@ -28,7 +28,6 @@ LOCAL_SRC_FILES := \ $(ZT1)/node/AES_aesni.cpp \ $(ZT1)/node/AES_armcrypto.cpp \ $(ZT1)/node/Bond.cpp \ - $(ZT1)/node/BondController.cpp \ $(ZT1)/node/C25519.cpp \ $(ZT1)/node/Capability.cpp \ $(ZT1)/node/CertificateOfMembership.cpp \ diff --git a/make-linux.mk b/make-linux.mk index 645aa0fd5..117e9a5e0 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -245,6 +245,16 @@ ERR=$(error FATAL: architecture could not be determined from $(CC) -dumpmachine: err: ; $(ERR) endif +# Flag for Intel 32-bit processors since some machine images are incorrectly marked as i386 +ifeq ($(ZT_IA32),1) + override LDFLAGS+=-m32 + override CFLAGS+=-m32 + override CXXFLAGS+=-m32 + # Prevent the use of X64 crypto + ZT_USE_X64_ASM_SALSA=0 + ZT_USE_X64_ASM_ED25519=0 +endif + # Disable software updates by default on Linux since that is normally done with package management override DEFS+=-DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=$(ZT_ARCHITECTURE) -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" diff --git a/osdep/LinuxEthernetTap.cpp b/osdep/LinuxEthernetTap.cpp index acf972682..35a123873 100644 --- a/osdep/LinuxEthernetTap.cpp +++ b/osdep/LinuxEthernetTap.cpp @@ -213,6 +213,9 @@ LinuxEthernetTap::LinuxEthernetTap( return; } + usleep(100000); + + ifr.ifr_flags |= IFF_MULTICAST; ifr.ifr_flags |= IFF_UP; if (ioctl(sock,SIOCSIFFLAGS,(void *)&ifr) < 0) { ::close(sock); @@ -220,11 +223,15 @@ LinuxEthernetTap::LinuxEthernetTap( return; } - // Some kernel versions seem to require you to yield while the device comes up - // before they will accept MTU and MAC. For others it doesn't matter, but is - // harmless. This was moved to the worker thread though so as not to block the - // main ZeroTier loop. - usleep(500000); + usleep(100000); + + ifr.ifr_ifru.ifru_hwaddr.sa_family = ARPHRD_ETHER; + _mac.copyTo(ifr.ifr_ifru.ifru_hwaddr.sa_data,6); + if (ioctl(sock,SIOCSIFHWADDR,(void *)&ifr) < 0) { + ::close(sock); + printf("WARNING: ioctl() failed setting up Linux tap device (set MAC)\n"); + return; + } ifr.ifr_ifru.ifru_mtu = (int)_mtu; if (ioctl(sock,SIOCSIFMTU,(void *)&ifr) < 0) { diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 000000000..47adc59ef --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,70 @@ +name: zerotier +summary: ZeroTier is a software-based managed Ethernet switch for planet Earth. +description: | + It erases the LAN/WAN distinction and makes VPNs, tunnels, proxies, and other kludges arising from the inflexible nature of physical networks obsolete. Everything is encrypted end-to-end and traffic takes the most direct (peer to peer) path available. + This snap contains ZeroTier One, a service that provides ZeroTier network connectivity and makes joining virtual networks as easy as joining IRC or Slack channels. + Visit ZeroTier's site for more information and pre-built binary packages. Apps for Android and iOS are available for free in the Google Play and Apple app stores. + Install + sudo snap install zerotier + Join your network + sudo zerotier.cli join 8056c2e21c000001 + sudo zerotier.cli status + Approve your new node in ZeroTier Central (https://my.zerotier.com)! Welcome online! + +adopt-info: one +confinement: strict +grade: stable +base: core18 + +apps: + one: + # Add -U to prevent attempting to drop privileges since snaps have their + # own containment mechanism. Otherwise, if a user named "zerotier-one" + # exists on the system, the setgid or related calls will fail. + command: usr/sbin/zerotier-one -U + daemon: simple + plugs: + - network + - network-bind + - network-control + + cli: + command: usr/sbin/zerotier-cli + plugs: + - network + + idtool: + command: usr/sbin/zerotier-idtool + plugs: + - network + +layout: + /var/lib/zerotier-one: + bind: $SNAP_COMMON + +parts: + one: + plugin: make + source: . + source-type: git + build-packages: + - build-essential + - libc++-dev + make-parameters: + - CXX=g++ + filesets: + binaries: + - usr/sbin/zerotier-one + - usr/sbin/zerotier-cli + - usr/sbin/zerotier-idtool + prime: + - $binaries + override-build: | + snapcraftctl build + # Grab the version string from the newly-compiled binary. + snapcraftctl set-version "$(./zerotier-one -v)" +slots: + zerotier-control: + interface: content + read: + - $SNAP_COMMON \ No newline at end of file diff --git a/version.h b/version.h index 3e5172416..bb74e0fed 100644 --- a/version.h +++ b/version.h @@ -27,7 +27,7 @@ /** * Revision */ -#define ZEROTIER_ONE_VERSION_REVISION 1 +#define ZEROTIER_ONE_VERSION_REVISION 2 /** * Build version diff --git a/zerotier-one.spec b/zerotier-one.spec index 116b904d6..d6ddb83b2 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -1,5 +1,5 @@ Name: zerotier-one -Version: 1.8.1 +Version: 1.8.2 Release: 1%{?dist} Summary: ZeroTier network virtualization service @@ -152,6 +152,9 @@ esac %endif %changelog +* Mon Nov 08 2021 Adam Ierymenko - 1.8.2 +- see https://github.com/zerotier/ZeroTierOne for release notes + * Wed Oct 20 2021 Adam Ierymenko - 1.8.1 - see https://github.com/zerotier/ZeroTierOne for release notes