Merge branch 'tetanus' of github.com:/zerotier/ZeroTierOne into tetanus

This commit is contained in:
Adam Ierymenko 2022-12-13 09:55:40 -05:00
commit 49d9982aa2
32 changed files with 82 additions and 31 deletions

51
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,51 @@
on: [ push ]
jobs:
build_ubuntu:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: make
run: make
build_macos:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: make
run: make
test_ubuntu:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: cargo test
run: cargo test -v
test_macos:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: cargo test
run: cargo test -v
# build_windows:
# runs-on: windows-latest
# steps:
# - name: checkout
# uses: actions/checkout@v3
# - name: setup msbuild
# uses: microsoft/setup-msbuild@v1.1.3
# - name: msbuild
# run: |
# msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne:Rebuild

View file

@ -202,7 +202,7 @@ pub trait InnerProtocol: Sync + Send {
PacketHandlerResult::NotHandled PacketHandlerResult::NotHandled
} }
/// Handle an OK, returing true if the OK was recognized. /// Handle an OK, returning true if the OK was recognized.
/// The default version returns NotHandled. /// The default version returns NotHandled.
fn handle_ok<HostSystemImpl: HostSystem + ?Sized>( fn handle_ok<HostSystemImpl: HostSystem + ?Sized>(
&self, &self,

View file

@ -502,7 +502,7 @@ impl Peer {
// Decryption successful with static secret. // Decryption successful with static secret.
message_id2 message_id2
} else { } else {
// Packet failed to decrypt using either ephemeral or permament key, reject. // Packet failed to decrypt using either ephemeral or permanent key, reject.
debug_event!( debug_event!(
host_system, host_system,
"[vl1] #{:0>16x} failed authentication", "[vl1] #{:0>16x} failed authentication",

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::fmt::Debug; use std::fmt::Debug;
use std::io::Write; use std::io::Write;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::fmt::Debug; use std::fmt::Debug;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::error::Error; use std::error::Error;
use std::fmt::{Debug, Display}; use std::fmt::{Debug, Display};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::io::Write; use std::io::Write;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::error::Error; use std::error::Error;
use std::fmt::{Debug, Display}; use std::fmt::{Debug, Display};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
// These were taken from BSD sysexits.h to provide some standard for process exit codes. // These were taken from BSD sysexits.h to provide some standard for process exit codes.

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
//use std::sync::atomic::{AtomicI64, Ordering}; //use std::sync::atomic::{AtomicI64, Ordering};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::mem::{size_of, MaybeUninit}; use std::mem::{size_of, MaybeUninit};
use std::ptr::copy_nonoverlapping; use std::ptr::copy_nonoverlapping;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
pub const HEX_CHARS: [u8; 16] = [ pub const HEX_CHARS: [u8; 16] = [
b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'a', b'b', b'c', b'd', b'e', b'f', b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'a', b'b', b'c', b'd', b'e', b'f',

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
pub mod arrayvec; pub mod arrayvec;
pub mod blob; pub mod blob;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::error::Error; use std::error::Error;
use std::fmt::{Debug, Display}; use std::fmt::{Debug, Display};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
#[allow(unused_imports)] #[allow(unused_imports)]
use std::mem::{needs_drop, size_of, MaybeUninit}; use std::mem::{needs_drop, size_of, MaybeUninit};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
use std::ptr::NonNull; use std::ptr::NonNull;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::mem::MaybeUninit; use std::mem::MaybeUninit;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};
use std::mem::MaybeUninit; use std::mem::MaybeUninit;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::any::TypeId; use std::any::TypeId;
use std::mem::{forget, size_of, MaybeUninit}; use std::mem::{forget, size_of, MaybeUninit};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::io::{Read, Write}; use std::io::{Read, Write};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
/// A list of unassigned or obsolete ports under 1024 that could possibly be squatted. /// A list of unassigned or obsolete ports under 1024 that could possibly be squatted.
pub const UNASSIGNED_PRIVILEGED_PORTS: [u16; 299] = [ pub const UNASSIGNED_PRIVILEGED_PORTS: [u16; 299] = [

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::str::FromStr; use std::str::FromStr;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
mod localinterface; mod localinterface;
mod localsocket; mod localsocket;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::hash::Hash; use std::hash::Hash;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::hash::Hash; use std::hash::Hash;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::mem::size_of; use std::mem::size_of;
use std::ptr::{copy_nonoverlapping, null_mut}; use std::ptr::{copy_nonoverlapping, null_mut};

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
#[allow(unused_imports)] #[allow(unused_imports)]
use zerotier_network_hypervisor::vl1::InetAddress; use zerotier_network_hypervisor::vl1::InetAddress;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
pub mod getifaddrs; pub mod getifaddrs;
pub mod ipv6; pub mod ipv6;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
#[allow(unused_imports)] #[allow(unused_imports)]

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
use std::error::Error; use std::error::Error;

View file

@ -1,4 +1,4 @@
// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // (c) 2020-2022 ZeroTier, Inc. -- currently proprietary pending actual release and licensing. See LICENSE.md.
use std::collections::HashSet; use std::collections::HashSet;