From 012bd9195dab228064d3135fec510086826b5095 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 17 Feb 2020 19:49:03 +0000 Subject: [PATCH 1/5] Update CHANGELOG.md --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3950f7b..ab3e9666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - in case of vulnerabilities. --> +## [0.3.13] - 2020-02-21 +### Added +- Support for the Wireguard TUN driver, which now replaces Water and provides far better support and performance on Windows +- Windows `.msi` installer files are now supported (bundling the Wireguard TUN driver) +- NodeInfo code is now actorised, should be more reliable +- The DHT now tries to store the two closest nodes in either direction instead of one, such that if a node goes offline, the replacement is already known +- The Yggdrasil API now supports dialing a remote node using the public key instead of the Node ID + +### Changed +- The `-loglevel` command line parameter is now cumulative and automatically includes all levels below the one specified +- DHT search code has been significantly simplified and processes rumoured nodes in parallel, speeding up search time +- DHT search results are now sorted +- The systemd service now handles configuration generation in a different unit +- The Yggdrasil API now returns public keys instead of node IDs when querying for local and remote addresses + +### Fixed +- The multicast code no longer panics when shutting down the node +- A potential OOB error when calculating IPv4 flow labels (when tunnel routing is enabled) has been fixed +- A bug resulting in incorrect idle notifications in the switch should now be fixed +- MTUs are now using a common datatype throughout the codebase + +### Removed +- TAP mode has been removed entirely, since it is no longer supported with the Wireguard TUN package. Please note that if you are using TAP mode, you may need to revise your config! +- NetBSD support has been removed until the Wireguard TUN package supports NetBSD + ## [0.3.12] - 2019-11-24 ### Added - New API functions `SetMaximumSessionMTU` and `GetMaximumSessionMTU` From d41da9a97f9bc42fbe75a58dc979289a9ba71d1a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 20 Feb 2020 23:22:42 +0000 Subject: [PATCH 2/5] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c02151f4..dcc9bd91 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ some of the below: - Windows - FreeBSD - OpenBSD -- NetBSD - OpenWrt Please see our [Platforms](https://yggdrasil-network.github.io/platforms.html) pages for more From 7d590e31b0824b327c327427daac2b8c8b3b4e19 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 21 Feb 2020 19:14:40 +0000 Subject: [PATCH 3/5] Include yggdrasil-default-config.service --- contrib/deb/generate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/deb/generate.sh b/contrib/deb/generate.sh index 90707a7c..50f37f4a 100644 --- a/contrib/deb/generate.sh +++ b/contrib/deb/generate.sh @@ -110,7 +110,7 @@ EOF cp yggdrasil /tmp/$PKGNAME/usr/bin/ cp yggdrasilctl /tmp/$PKGNAME/usr/bin/ -cp contrib/systemd/yggdrasil.service /tmp/$PKGNAME/etc/systemd/system/ +cp contrib/systemd/*.service /tmp/$PKGNAME/etc/systemd/system/ tar -czvf /tmp/$PKGNAME/data.tar.gz -C /tmp/$PKGNAME/ \ usr/bin/yggdrasil usr/bin/yggdrasilctl \ From d160eccab00443187e2343c707c60f37c7fbcfde Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 21 Feb 2020 19:32:36 +0000 Subject: [PATCH 4/5] Hopefully really actually fix it this time --- contrib/deb/generate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/deb/generate.sh b/contrib/deb/generate.sh index 50f37f4a..1f3186a4 100644 --- a/contrib/deb/generate.sh +++ b/contrib/deb/generate.sh @@ -114,7 +114,8 @@ cp contrib/systemd/*.service /tmp/$PKGNAME/etc/systemd/system/ tar -czvf /tmp/$PKGNAME/data.tar.gz -C /tmp/$PKGNAME/ \ usr/bin/yggdrasil usr/bin/yggdrasilctl \ - etc/systemd/system/yggdrasil.service + etc/systemd/system/yggdrasil.service \ + etc/systemd/system/yggdrasil-default-config.service tar -czvf /tmp/$PKGNAME/control.tar.gz -C /tmp/$PKGNAME/debian . echo 2.0 > /tmp/$PKGNAME/debian-binary From 8075a609009b928d392bd1ab6113c6376cdb1238 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 8 Mar 2020 19:32:14 -0500 Subject: [PATCH 5/5] possibly fix memory leak (if this works, i don't yet understand how the leak was happening originally) --- src/yggdrasil/switch.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/yggdrasil/switch.go b/src/yggdrasil/switch.go index 653b12f1..5e4d3e92 100644 --- a/src/yggdrasil/switch.go +++ b/src/yggdrasil/switch.go @@ -800,7 +800,7 @@ func (t *switchTable) _handleIdle(port switchPort) bool { t.queues._cleanup(t) now := time.Now() for psize < 65535 { - var best string + var best *string var bestPriority float64 for streamID, buf := range t.queues.bufs { // Filter over the streams that this node is closer to @@ -809,22 +809,23 @@ func (t *switchTable) _handleIdle(port switchPort) bool { coords := switch_getPacketCoords(packet.bytes) priority := float64(now.Sub(packet.time)) / float64(buf.size) if priority >= bestPriority && t.portIsCloser(coords, port) { - best = streamID + b := streamID // copy since streamID is mutated in the loop + best = &b bestPriority = priority } } - if best != "" { - buf := t.queues.bufs[best] + if best != nil { + buf := t.queues.bufs[*best] var packet switch_packetInfo // TODO decide if this should be LIFO or FIFO packet, buf.packets = buf.packets[0], buf.packets[1:] buf.size -= uint64(len(packet.bytes)) t.queues.size -= uint64(len(packet.bytes)) if len(buf.packets) == 0 { - delete(t.queues.bufs, best) + delete(t.queues.bufs, *best) } else { // Need to update the map, since buf was retrieved by value - t.queues.bufs[best] = buf + t.queues.bufs[*best] = buf } packets = append(packets, packet.bytes) psize += len(packet.bytes)