diff --git a/Cargo.lock b/Cargo.lock index 224d07d..9cb202f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "vpncloud" version = "0.3.0" dependencies = [ "aligned_alloc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.6.76 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 0.6.78 (registry+https://github.com/rust-lang/crates.io-index)", "epoll 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -26,7 +26,7 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -49,10 +49,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "docopt" -version = "0.6.76" +version = "0.6.78" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -145,10 +145,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "0.1.41" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/README.md b/README.md index 31d17e8..4c811d2 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This is what works: * Setting up tunnels between two networks via Ethernet (TAP) and IP (TUN) * Connecting multiple networks with multiple forwarding behaviors (Hub, Switch, Router) -* Encrypted connections using *libsodium* +* Encrypted connections using [libsodium](https://github.com/jedisct1/libsodium) * Automatic peer-to-peer meshing * NAT and (limited) firewall traversal using hole punching * Automatic reconnecting when connections are lost diff --git a/deb/Makefile b/deb/Makefile index 909d1b5..a581100 100644 --- a/deb/Makefile +++ b/deb/Makefile @@ -6,10 +6,20 @@ default: clean build .PHONY: build build: $(PACKAGE)_*.deb -$(PACKAGE)_*.deb: +$(PACKAGE)_*.deb: $(PACKAGE)/vpncloud.1.ronn $(PACKAGE)/vpncloud (cd $(PACKAGE); make clean; debuild -b -us -uc; cd ..) .PHONY: clean clean: (cd $(PACKAGE); debuild clean; cd ..) rm -rf $(PACKAGE)_* + rm ../target/release/vpncloud + +$(PACKAGE)/vpncloud.1.ronn: ../vpncloud.md + cp ../vpncloud.md $(PACKAGE)/vpncloud.1.ronn + +$(PACKAGE)/vpncloud: ../target/release/vpncloud + cp ../target/release/vpncloud $(PACKAGE)/vpncloud + +../target/release/vpncloud: ../src/*.rs ../Cargo.toml + (cd ..; cargo build --release) diff --git a/deb/vpncloud/Makefile b/deb/vpncloud/Makefile index 1d35745..a0a8d2d 100644 --- a/deb/vpncloud/Makefile +++ b/deb/vpncloud/Makefile @@ -1,20 +1,8 @@ -build: vpncloud.1 vpncloud +build: vpncloud.1 vpncloud.1: vpncloud.1.ronn ronn -r vpncloud.1.ronn -vpncloud.1.ronn: ../../vpncloud.md - cp ../../vpncloud.md vpncloud.1.ronn - -clean: - rm -f vpncloud.1* vpncloud ../../target/release/vpncloud - -vpncloud: ../../target/release/vpncloud - cp ../../target/release/vpncloud vpncloud - -../../target/release/vpncloud: ../../src/*.rs ../../Cargo.toml ../../src/usage.txt ../../src/c/* - (cd ../..; cargo build --release) - install: install -d $(DESTDIR)/usr/bin install -m 755 vpncloud $(DESTDIR)/usr/bin/vpncloud diff --git a/deb/vpncloud/debian/changelog b/deb/vpncloud/debian/changelog index 671262c..74d0282 100644 --- a/deb/vpncloud/debian/changelog +++ b/deb/vpncloud/debian/changelog @@ -1,3 +1,10 @@ +vpncloud (0.3.0) stable; urgency=medium + + * Inluding libsodium-1.0.7 + * Support for AES256 + + -- Dennis Schwerdel Tue, 01 Dec 2015 16:12:16 +0100 + vpncloud (0.2.0) stable; urgency=medium * More stable release diff --git a/src/cloud.rs b/src/cloud.rs index a0d2a90..8bae2b5 100644 --- a/src/cloud.rs +++ b/src/cloud.rs @@ -220,11 +220,9 @@ impl GenericCloud

{ } fn handle_net_message(&mut self, peer: SocketAddr, options: Options, msg: Message) -> Result<(), Error> { - if let Some(id) = self.options.network_id { - if options.network_id != Some(id) { - info!("Ignoring message from {} with wrong token {:?}", peer, options.network_id); - return Err(Error::WrongNetwork(options.network_id)); - } + if self.options.network_id != options.network_id { + info!("Ignoring message from {} with wrong token {:?}", peer, options.network_id); + return Err(Error::WrongNetwork(options.network_id)); } debug!("Received {:?} from {}", msg, peer); match msg {