aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-16 18:34:51 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-16 18:39:54 +0200
commit865d7cbe6c30da1a40df5a7d46c542fa372373b9 (patch)
tree114c7613c2b212f82636f61729ae2afb23bdda68
parentdeps: Update Cargo.lock for new snow and rips-packets (diff)
downloadwireguard-rs-865d7cbe6c30da1a40df5a7d46c542fa372373b9.tar.xz
wireguard-rs-865d7cbe6c30da1a40df5a7d46c542fa372373b9.zip
Copyright and license headers
-rw-r--r--Cargo.toml2
-rw-r--r--benches/criterion.rs5
-rw-r--r--src/anti_replay.rs20
-rw-r--r--src/consts.rs5
-rw-r--r--src/cookie.rs5
-rw-r--r--src/error.rs7
-rw-r--r--src/interface/config.rs5
-rw-r--r--src/interface/grim_reaper.rs5
-rw-r--r--src/interface/mod.rs5
-rw-r--r--src/interface/peer_server.rs5
-rw-r--r--src/ip_packet.rs5
-rw-r--r--src/lib.rs5
-rw-r--r--src/main.rs5
-rw-r--r--src/message.rs5
-rw-r--r--src/noise.rs5
-rw-r--r--src/peer.rs5
-rw-r--r--src/ratelimiter.rs7
-rw-r--r--src/router.rs5
-rw-r--r--src/timer.rs5
-rw-r--r--src/timestamp.rs5
-rw-r--r--src/types.rs5
-rw-r--r--src/udp/frame.rs5
-rw-r--r--src/udp/mod.rs5
-rw-r--r--src/xchacha20poly1305.rs5
24 files changed, 117 insertions, 19 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4bdba9c..2b2fc09 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wireguard"
version = "0.0.0"
-authors = ["Jake McGinty <me@jake.su>"]
+authors = ["WireGuard Development Team <team@wireguard.com>"]
license = "GPL-3.0"
repository = "https://git.zx2c4.com/wireguard-rs/"
description = "Userspace implementation of WireGuard, a fast, modern and secure VPN tunnel."
diff --git a/benches/criterion.rs b/benches/criterion.rs
index eac927d..5e30abb 100644
--- a/benches/criterion.rs
+++ b/benches/criterion.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![feature(try_from)]
#[macro_use]
diff --git a/src/anti_replay.rs b/src/anti_replay.rs
index 58d490a..e71285d 100644
--- a/src/anti_replay.rs
+++ b/src/anti_replay.rs
@@ -1,19 +1,7 @@
-// Copyright 2017 Guanhao Yin <sopium@mysterious.site>
-
-// This file is part of WireGuard.rs.
-
-// WireGuard.rs 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.
-
-// WireGuard.rs 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 WireGuard.rs. If not, see <https://www.gnu.org/licenses/>.
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
use failure::Error;
diff --git a/src/consts.rs b/src/consts.rs
index 6340129..c9ac73a 100644
--- a/src/consts.rs
+++ b/src/consts.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![allow(dead_code)]
use std::u64;
diff --git a/src/cookie.rs b/src/cookie.rs
index 8216985..c01c7c4 100644
--- a/src/cookie.rs
+++ b/src/cookie.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![allow(unused)]
use consts::COOKIE_REFRESH_TIME;
diff --git a/src/error.rs b/src/error.rs
index 0cddd08..b2a4b61 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,5 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
//use failure::Error;
//#[derive(Debug, Fail)]
//enum WireguardError {
-//} \ No newline at end of file
+//}
diff --git a/src/interface/config.rs b/src/interface/config.rs
index 5597bd8..2f8319c 100644
--- a/src/interface/config.rs
+++ b/src/interface/config.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
//! The configuration logic for userspace WireGuard.
// Dev notes:
diff --git a/src/interface/grim_reaper.rs b/src/interface/grim_reaper.rs
index 1c5029d..c48782f 100644
--- a/src/interface/grim_reaper.rs
+++ b/src/interface/grim_reaper.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use failure::Error;
use futures::{self, Future, Async, Poll, Stream};
use notify::{self, Watcher, RecursiveMode, RawEvent, raw_watcher};
diff --git a/src/interface/mod.rs b/src/interface/mod.rs
index 7036a09..8661d9d 100644
--- a/src/interface/mod.rs
+++ b/src/interface/mod.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
mod config;
mod grim_reaper;
pub mod peer_server;
diff --git a/src/interface/peer_server.rs b/src/interface/peer_server.rs
index 9616ba2..a7c82cd 100644
--- a/src/interface/peer_server.rs
+++ b/src/interface/peer_server.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use consts::{REKEY_TIMEOUT, KEEPALIVE_TIMEOUT, STALE_SESSION_TIMEOUT,
MAX_CONTENT_SIZE, WIPE_AFTER_TIME, MAX_HANDSHAKE_ATTEMPTS,
UNDER_LOAD_QUEUE_SIZE, UNDER_LOAD_TIME};
diff --git a/src/ip_packet.rs b/src/ip_packet.rs
index 9150f5b..3479e20 100644
--- a/src/ip_packet.rs
+++ b/src/ip_packet.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use rips_packets::ipv4::Ipv4Packet;
use rips_packets::ipv6::Ipv6Packet;
use std::net::IpAddr;
diff --git a/src/lib.rs b/src/lib.rs
index 5b41b8f..99c8fa4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![allow(unknown_lints)]
#![warn(clippy)]
#![feature(ip_constructors)]
diff --git a/src/main.rs b/src/main.rs
index df37a75..7460ea7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![feature(test)]
#![allow(unknown_lints)]
#![warn(clippy)]
diff --git a/src/message.rs b/src/message.rs
index 6a2b645..12b2eb7 100644
--- a/src/message.rs
+++ b/src/message.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![allow(unused)]
use failure::Error;
diff --git a/src/noise.rs b/src/noise.rs
index 1f65139..c26a6fe 100644
--- a/src/noise.rs
+++ b/src/noise.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use failure::Error;
use snow::{NoiseBuilder, Session};
use snow::params::NoiseParams;
diff --git a/src/peer.rs b/src/peer.rs
index a6cc215..4d9eab9 100644
--- a/src/peer.rs
+++ b/src/peer.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use anti_replay::AntiReplay;
use byteorder::{ByteOrder, LittleEndian};
use consts::{TRANSPORT_OVERHEAD, TRANSPORT_HEADER_SIZE, REKEY_AFTER_MESSAGES, REKEY_AFTER_TIME,
diff --git a/src/ratelimiter.rs b/src/ratelimiter.rs
index bdc5c7c..07aeb43 100644
--- a/src/ratelimiter.rs
+++ b/src/ratelimiter.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![allow(dead_code)]
use timestamp::Timestamp;
@@ -174,4 +179,4 @@ mod tests {
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/router.rs b/src/router.rs
index 30d262f..895254a 100644
--- a/src/router.rs
+++ b/src/router.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use failure::{Error, err_msg};
use interface::SharedPeer;
use treebitmap::{IpLookupTable, IpLookupTableOps};
diff --git a/src/timer.rs b/src/timer.rs
index aea41e9..659d313 100644
--- a/src/timer.rs
+++ b/src/timer.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use consts::TIMER_RESOLUTION;
use futures::{Future, Stream, Sink, Poll, unsync};
use std::{cell::RefCell, rc::Rc};
diff --git a/src/timestamp.rs b/src/timestamp.rs
index 0f1322c..69e5d96 100644
--- a/src/timestamp.rs
+++ b/src/timestamp.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use byteorder::{ByteOrder, BigEndian};
use std::ops::Deref;
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
diff --git a/src/types.rs b/src/types.rs
index 77a104d..d32d4ce 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use base64;
use std::fmt::{self, Display, Formatter};
use std::net::IpAddr;
diff --git a/src/udp/frame.rs b/src/udp/frame.rs
index f2f5f00..8d26db3 100644
--- a/src/udp/frame.rs
+++ b/src/udp/frame.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use std::io;
use std::net::{SocketAddr, Ipv4Addr, SocketAddrV4, IpAddr};
use std::os::unix::io::{AsRawFd, RawFd};
diff --git a/src/udp/mod.rs b/src/udp/mod.rs
index 8227559..2a512cd 100644
--- a/src/udp/mod.rs
+++ b/src/udp/mod.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
#![allow(unused)]
use std::{fmt, io, mem};
diff --git a/src/xchacha20poly1305.rs b/src/xchacha20poly1305.rs
index 7e149b8..4a39e37 100644
--- a/src/xchacha20poly1305.rs
+++ b/src/xchacha20poly1305.rs
@@ -1,3 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
+ */
+
use byteorder::{ByteOrder, LittleEndian};
use chacha20_poly1305_aead;
use failure::Error;