From ee0e306685a9b38b36396c5348ef3de2e525fea1 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 20 Apr 2021 14:56:33 -0400 Subject: [PATCH 1/3] Windows version bump. --- ext/installfiles/windows/ZeroTier One.aip | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index 5f76f4e5c..ba7873e24 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -17,7 +17,6 @@ - @@ -26,10 +25,10 @@ - + - + @@ -62,8 +61,8 @@ - - + + @@ -110,6 +109,9 @@ + + + @@ -319,9 +321,6 @@ - - - @@ -337,6 +336,9 @@ + + + @@ -359,7 +361,6 @@ - @@ -379,7 +380,7 @@ - + @@ -388,6 +389,7 @@ + @@ -420,21 +422,23 @@ + - + + - - + + @@ -479,7 +483,7 @@ - + From 9374e45449ffe5c377e4cb2a346129ec598eeea9 Mon Sep 17 00:00:00 2001 From: Jonathon Fernyhough Date: Wed, 21 Apr 2021 12:30:51 +0100 Subject: [PATCH 3/3] Reorder Linux TAP link sequence This corrects the flow for bringing up a TAP device under Linux. Closes #1314 --- osdep/LinuxEthernetTap.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/osdep/LinuxEthernetTap.cpp b/osdep/LinuxEthernetTap.cpp index a2a942dcc..f97f67c2d 100644 --- a/osdep/LinuxEthernetTap.cpp +++ b/osdep/LinuxEthernetTap.cpp @@ -207,12 +207,6 @@ LinuxEthernetTap::LinuxEthernetTap( printf("WARNING: ioctl() failed setting up Linux tap device (bring interface up)\n"); return; } - ifr.ifr_flags |= IFF_UP; - if (ioctl(sock,SIOCSIFFLAGS,(void *)&ifr) < 0) { - ::close(sock); - printf("WARNING: ioctl() failed setting up Linux tap device (bring interface up)\n"); - 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 @@ -235,6 +229,13 @@ LinuxEthernetTap::LinuxEthernetTap( return; } + ifr.ifr_flags |= IFF_UP; + if (ioctl(sock,SIOCSIFFLAGS,(void *)&ifr) < 0) { + ::close(sock); + printf("WARNING: ioctl() failed setting up Linux tap device (bring interface up)\n"); + return; + } + fcntl(_fd,F_SETFL,O_NONBLOCK); ::close(sock);