]> git.ipfire.org Git - thirdparty/wireguard-go.git/log
thirdparty/wireguard-go.git
7 years agoSmoother netlink shutdown
Jason A. Donenfeld [Mon, 14 May 2018 01:43:56 +0000 (03:43 +0200)] 
Smoother netlink shutdown

7 years agoOptional logging even in background
Jason A. Donenfeld [Mon, 14 May 2018 01:38:06 +0000 (03:38 +0200)] 
Optional logging even in background

7 years agoFix dummy additions
Jason A. Donenfeld [Mon, 14 May 2018 01:29:21 +0000 (03:29 +0200)] 
Fix dummy additions

7 years agoLook up route for every peer
Jason A. Donenfeld [Mon, 14 May 2018 01:00:40 +0000 (03:00 +0200)] 
Look up route for every peer

7 years agoEnsure go routines can exit
Jason A. Donenfeld [Mon, 14 May 2018 00:14:33 +0000 (02:14 +0200)] 
Ensure go routines can exit

7 years agoSend event on erroring kqueue
Jason A. Donenfeld [Sun, 13 May 2018 22:37:22 +0000 (00:37 +0200)] 
Send event on erroring kqueue

7 years agoIntroduce rwcancel
Jason A. Donenfeld [Sun, 13 May 2018 22:28:30 +0000 (00:28 +0200)] 
Introduce rwcancel

7 years agoPrettier abbreviation
Jason A. Donenfeld [Sun, 13 May 2018 21:27:28 +0000 (23:27 +0200)] 
Prettier abbreviation

7 years agoMore refactoring
Jason A. Donenfeld [Sun, 13 May 2018 21:14:43 +0000 (23:14 +0200)] 
More refactoring

7 years agoMore odds and ends
Jason A. Donenfeld [Sun, 13 May 2018 17:50:58 +0000 (19:50 +0200)] 
More odds and ends

7 years agoFix up tests
Jason A. Donenfeld [Sun, 13 May 2018 17:35:11 +0000 (19:35 +0200)] 
Fix up tests

7 years agoOdds and ends
Jason A. Donenfeld [Sun, 13 May 2018 17:33:41 +0000 (19:33 +0200)] 
Odds and ends

7 years agoCleanup ratelimiter
Jason A. Donenfeld [Sun, 13 May 2018 16:42:06 +0000 (18:42 +0200)] 
Cleanup ratelimiter

7 years agoRework index hashtable
Jason A. Donenfeld [Sun, 13 May 2018 16:23:40 +0000 (18:23 +0200)] 
Rework index hashtable

7 years agoRewrite timers and related state machines
Jason A. Donenfeld [Mon, 7 May 2018 20:27:03 +0000 (22:27 +0200)] 
Rewrite timers and related state machines

7 years agoMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Mathias Hall-Andersen [Sat, 5 May 2018 20:10:22 +0000 (22:10 +0200)] 
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go

7 years agoRemoved remaining signals from peer
Mathias Hall-Andersen [Sat, 5 May 2018 20:07:58 +0000 (22:07 +0200)] 
Removed remaining signals from peer

1. Removed remaining signals from peer struct
2. Made needAnotherKeepalive local
3. Removed environment check from warning text (annoying when debugging)

7 years agoReorder stopping messages so that logs are coherent
Jason A. Donenfeld [Sat, 5 May 2018 04:09:30 +0000 (06:09 +0200)] 
Reorder stopping messages so that logs are coherent

7 years agoMore robust solution to close deadlock
Jason A. Donenfeld [Sat, 5 May 2018 04:00:38 +0000 (06:00 +0200)] 
More robust solution to close deadlock

7 years agoFix infinite loop in exit routine
Jason A. Donenfeld [Sat, 5 May 2018 03:33:29 +0000 (05:33 +0200)] 
Fix infinite loop in exit routine

7 years agoMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Mathias Hall-Andersen [Sat, 5 May 2018 02:42:44 +0000 (04:42 +0200)] 
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go

7 years agoUse Int32n for jitter
Mathias Hall-Andersen [Sat, 5 May 2018 02:42:17 +0000 (04:42 +0200)] 
Use Int32n for jitter

7 years agoMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Jason A. Donenfeld [Sat, 5 May 2018 02:20:16 +0000 (04:20 +0200)] 
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go

7 years agoMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Mathias Hall-Andersen [Sat, 5 May 2018 02:15:41 +0000 (04:15 +0200)] 
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go

7 years agoRemoved old signals
Mathias Hall-Andersen [Sat, 5 May 2018 02:15:07 +0000 (04:15 +0200)] 
Removed old signals

7 years agotun: simplify and combine creation logic on Linux
Jason A. Donenfeld [Sat, 5 May 2018 01:36:09 +0000 (03:36 +0200)] 
tun: simplify and combine creation logic on Linux

7 years agoStyle
Jason A. Donenfeld [Sat, 5 May 2018 00:48:21 +0000 (02:48 +0200)] 
Style

7 years agoMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Mathias Hall-Andersen [Sat, 5 May 2018 00:47:59 +0000 (02:47 +0200)] 
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go

7 years agotun: account for null termination on Linux
Jason A. Donenfeld [Sat, 5 May 2018 00:47:35 +0000 (02:47 +0200)] 
tun: account for null termination on Linux

7 years agoMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Mathias Hall-Andersen [Sat, 5 May 2018 00:23:03 +0000 (02:23 +0200)] 
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go

7 years agoInitial version of migration to new event model
Mathias Hall-Andersen [Sat, 5 May 2018 00:20:52 +0000 (02:20 +0200)] 
Initial version of migration to new event model

- Begin move away from global timer state.
- Made logging format more consistent

7 years agouapi: use kqueue for sock deletion on darwin
Jason A. Donenfeld [Fri, 4 May 2018 19:51:55 +0000 (21:51 +0200)] 
uapi: use kqueue for sock deletion on darwin

7 years agotun: print automatically assigned interface name to stdout
Jason A. Donenfeld [Fri, 4 May 2018 19:20:19 +0000 (21:20 +0200)] 
tun: print automatically assigned interface name to stdout

This way scripts know what process they just started.

7 years agotun: allow darwin to auto assign names
Jason A. Donenfeld [Fri, 4 May 2018 19:11:38 +0000 (21:11 +0200)] 
tun: allow darwin to auto assign names

7 years agowarning: put into main
Jason A. Donenfeld [Fri, 4 May 2018 17:50:08 +0000 (19:50 +0200)] 
warning: put into main

7 years agoglobal: Add SPDX tags and copyright header
Jason A. Donenfeld [Thu, 3 May 2018 13:04:00 +0000 (15:04 +0200)] 
global: Add SPDX tags and copyright header

Mathias should probably add his copyright headers to each file too.

7 years agoDaemonize with environment variable
Jason A. Donenfeld [Thu, 3 May 2018 12:50:57 +0000 (14:50 +0200)] 
Daemonize with environment variable

7 years agoStart to dust off Darwin
Jason A. Donenfeld [Thu, 3 May 2018 02:49:35 +0000 (04:49 +0200)] 
Start to dust off Darwin

7 years agoAdd missing locks and fix debug output, and try to flush queues
Jason A. Donenfeld [Tue, 1 May 2018 14:59:13 +0000 (16:59 +0200)] 
Add missing locks and fix debug output, and try to flush queues

Flushing queues on exit is sort of a partial solution, but this could be
better. Really what we want is for no more packets to be enqueued after
isUp is set to false.

7 years agoClear src cache if route changes to new ifindex
Jason A. Donenfeld [Fri, 27 Apr 2018 03:21:45 +0000 (05:21 +0200)] 
Clear src cache if route changes to new ifindex

7 years agoFix error handling and cleanup of netlink listener
Jason A. Donenfeld [Fri, 27 Apr 2018 00:23:48 +0000 (02:23 +0200)] 
Fix error handling and cleanup of netlink listener

7 years agoFix wrong debug messages
Jason A. Donenfeld [Fri, 20 Apr 2018 05:13:40 +0000 (07:13 +0200)] 
Fix wrong debug messages

7 years agoRework sticky sockets
Jason A. Donenfeld [Fri, 20 Apr 2018 02:05:11 +0000 (04:05 +0200)] 
Rework sticky sockets

7 years agoCheck for correct first nibble
Jason A. Donenfeld [Fri, 20 Apr 2018 03:30:22 +0000 (05:30 +0200)] 
Check for correct first nibble

The code before assumed that the flow label was always zero.

7 years agoSignal using select and a pipe for bringing down TUN reader
Jason A. Donenfeld [Thu, 19 Apr 2018 05:46:27 +0000 (07:46 +0200)] 
Signal using select and a pipe for bringing down TUN reader

Waiting on resolution of these to fix in better way:
- https://github.com/golang/go/issues/22939
- https://github.com/golang/go/issues/24331

7 years agoWe can determine the interface name ourselves
Jason A. Donenfeld [Thu, 19 Apr 2018 13:54:33 +0000 (15:54 +0200)] 
We can determine the interface name ourselves

7 years agoDo not hard code MTU default
Jason A. Donenfeld [Thu, 19 Apr 2018 13:52:59 +0000 (15:52 +0200)] 
Do not hard code MTU default

7 years agoFixed read from closed channel
Mathias Hall-Andersen [Wed, 18 Apr 2018 18:29:48 +0000 (20:29 +0200)] 
Fixed read from closed channel

A premature waitgroup .Done resulted in reading from closed channel.
This caused a nil-pointer deref & crash.

Added additional debugging when closing routines.

7 years agoAllow determining name
Jason A. Donenfeld [Wed, 18 Apr 2018 14:39:14 +0000 (16:39 +0200)] 
Allow determining name

7 years agoUse socketcall on x86
Jason A. Donenfeld [Wed, 18 Apr 2018 05:54:39 +0000 (07:54 +0200)] 
Use socketcall on x86

7 years agoUse simple 16-bit integer for persistent keepalive
Jason A. Donenfeld [Wed, 18 Apr 2018 05:24:33 +0000 (07:24 +0200)] 
Use simple 16-bit integer for persistent keepalive

Races for this aren't a huge problem.

7 years agoAlign 64-bit atomics
Jason A. Donenfeld [Wed, 18 Apr 2018 04:54:21 +0000 (06:54 +0200)] 
Align 64-bit atomics

64-bit varibles that are accessed using the Go atomic functions must be
8-byte aligned on 32-bit platforms. Otherwise there are crashes.

7 years agoBegin work on full device<->device unit-test
Mathias Hall-Andersen [Thu, 8 Mar 2018 15:44:27 +0000 (16:44 +0100)] 
Begin work on full device<->device unit-test

To simulate a full interaction between two WireGuard
instances without networking, using dummy instances of the interfaces

7 years agoSupport nopi mode
Jason A. Donenfeld [Wed, 28 Feb 2018 11:40:56 +0000 (12:40 +0100)] 
Support nopi mode

7 years agoClose tun fd when bringing down tunnel
Jason A. Donenfeld [Sun, 18 Feb 2018 21:54:33 +0000 (22:54 +0100)] 
Close tun fd when bringing down tunnel

7 years agoFix timer typo
Jason A. Donenfeld [Sun, 18 Feb 2018 19:58:43 +0000 (20:58 +0100)] 
Fix timer typo

7 years agoSeperated fwmark update code into function
Mathias Hall-Andersen [Sun, 18 Feb 2018 19:49:03 +0000 (20:49 +0100)] 
Seperated fwmark update code into function

7 years agoMPLv2 for App Store
Jason A. Donenfeld [Tue, 13 Feb 2018 18:43:47 +0000 (19:43 +0100)] 
MPLv2 for App Store

7 years agoReimplemented bind_rtmgrp in pure Go
Dominik Süß [Tue, 13 Feb 2018 15:43:07 +0000 (16:43 +0100)] 
Reimplemented bind_rtmgrp in pure Go

Getting rid of the Cgo dependency for listing on netlink.

Ported original patch from "syscall" to "golang.org/x/sys/unix".

Signed-off-by: Dominik Süß <dominik.suess@outlook.at>
Co-Authored-By: Mathias Hall-Andersen <mathias@hall-andersen.dk>
7 years agoUse relative imports
Jason A. Donenfeld [Mon, 12 Feb 2018 22:48:09 +0000 (23:48 +0100)] 
Use relative imports

7 years agoRevert "Don't use modules"
Mathias Hall-Andersen [Mon, 12 Feb 2018 21:29:11 +0000 (22:29 +0100)] 
Revert "Don't use modules"

This reverts commit bffe99aeadae09abd02f2bd3184925af6b680535.

7 years agoDon't use modules
Jason A. Donenfeld [Mon, 12 Feb 2018 19:10:44 +0000 (20:10 +0100)] 
Don't use modules

Feel free to revert this if you have a strong feeling about it. But so
far as I can see, it adds a lot of complexity for basically no upsides.

7 years agoMoved test-processes to background
Mathias Hall-Andersen [Sun, 11 Feb 2018 22:31:53 +0000 (23:31 +0100)] 
Moved test-processes to background

7 years agoTUN status hack was causing spam during shutdown
Mathias Hall-Andersen [Sun, 11 Feb 2018 22:26:54 +0000 (23:26 +0100)] 
TUN status hack was causing spam during shutdown

7 years agoAdded missing mutex acquisition
Mathias Hall-Andersen [Sun, 11 Feb 2018 22:07:07 +0000 (23:07 +0100)] 
Added missing mutex acquisition

7 years agoRemoved exported methods from ratelimiter package
Mathias Hall-Andersen [Sun, 11 Feb 2018 22:01:55 +0000 (23:01 +0100)] 
Removed exported methods from ratelimiter package

7 years agoMoved ratelimiter to internal package
Mathias Hall-Andersen [Sun, 11 Feb 2018 21:53:39 +0000 (22:53 +0100)] 
Moved ratelimiter to internal package

7 years agoMoved tai64n into sub-package
Mathias Hall-Andersen [Sun, 11 Feb 2018 18:25:33 +0000 (19:25 +0100)] 
Moved tai64n into sub-package

7 years agoFixed tabs
Mathias Hall-Andersen [Sun, 11 Feb 2018 18:02:50 +0000 (19:02 +0100)] 
Fixed tabs

7 years agoReverted event changes
Mathias Hall-Andersen [Sun, 11 Feb 2018 17:55:30 +0000 (18:55 +0100)] 
Reverted event changes

This feature was not needed for Android, upon further inspection.

7 years agoStarted migration to sub-packages
Mathias Hall-Andersen [Fri, 9 Feb 2018 17:56:00 +0000 (18:56 +0100)] 
Started migration to sub-packages

7 years agoGo treats underscores specially
Jason A. Donenfeld [Wed, 7 Feb 2018 17:58:38 +0000 (18:58 +0100)] 
Go treats underscores specially

In case there's ever a platform called helpers or protocol, we don't
want to be doing this.

7 years agoWork on logging format
Mathias Hall-Andersen [Sun, 4 Feb 2018 18:18:44 +0000 (19:18 +0100)] 
Work on logging format

7 years agoMerge branch 'master' into timer-teardown
Mathias Hall-Andersen [Sun, 4 Feb 2018 15:48:03 +0000 (16:48 +0100)] 
Merge branch 'master' into timer-teardown

7 years agoRemoved debugging locks
Mathias Hall-Andersen [Sun, 4 Feb 2018 15:46:24 +0000 (16:46 +0100)] 
Removed debugging locks

7 years agoAlign with go library layout
Mathias Hall-Andersen [Sun, 4 Feb 2018 15:08:26 +0000 (16:08 +0100)] 
Align with go library layout

7 years agoFixed tests
Mathias Hall-Andersen [Fri, 2 Feb 2018 19:45:25 +0000 (20:45 +0100)] 
Fixed tests

7 years agoClear cryptographic state when interface down
Mathias Hall-Andersen [Fri, 2 Feb 2018 16:24:29 +0000 (17:24 +0100)] 
Clear cryptographic state when interface down

Attempts to clear the cryptographic state for every
peer when the device goes down.

7 years agoRework of entire locking system
Mathias Hall-Andersen [Fri, 2 Feb 2018 15:40:14 +0000 (16:40 +0100)] 
Rework of entire locking system

Locking on the Device instance is now much more fined-grained,
seperating out the fields into "resources" st. most common interactions
only require a small number.

7 years agoMerge branch 'timer-teardown' of git.zx2c4.com:wireguard-go into timer-teardown
Mathias Hall-Andersen [Thu, 1 Feb 2018 10:20:36 +0000 (11:20 +0100)] 
Merge branch 'timer-teardown' of git.zx2c4.com:wireguard-go into timer-teardown

7 years agoAdded binary to .gitignore
Mathias Hall-Andersen [Wed, 31 Jan 2018 09:11:36 +0000 (10:11 +0100)] 
Added binary to .gitignore

7 years agoAdded initial version of peer teardown
Mathias Hall-Andersen [Fri, 26 Jan 2018 21:52:32 +0000 (22:52 +0100)] 
Added initial version of peer teardown

There is a double lock issue with device.Close which has yet to be
resolved.

7 years agoFixed potential DoS issue
Mathias Hall-Andersen [Tue, 16 Jan 2018 13:57:12 +0000 (14:57 +0100)] 
Fixed potential DoS issue

7 years agoWork on timer teardown + bug fixes
Mathias Hall-Andersen [Sat, 13 Jan 2018 08:00:37 +0000 (09:00 +0100)] 
Work on timer teardown + bug fixes

Added waitgroups to peer struct for routine
start / stop synchronisation

7 years agoFixed fwmark update without device status change
Mathias Hall-Andersen [Tue, 9 Jan 2018 16:26:18 +0000 (17:26 +0100)] 
Fixed fwmark update without device status change

An update of the fwmark was missing,
when the device was not bought up after the change.

7 years agoRevert "Peer timer teardown"
Mathias Hall-Andersen [Thu, 4 Jan 2018 13:24:14 +0000 (14:24 +0100)] 
Revert "Peer timer teardown"

This reverts commit d73f960aab86b9a12b0b7d18aa80ce1d4f130695.

Problems with deadlocking arises due to orphaned packets in per-peer
queues. Additional work on this issue continues in seperate branch.

7 years agoPeer timer teardown
Mathias Hall-Andersen [Fri, 29 Dec 2017 16:42:09 +0000 (17:42 +0100)] 
Peer timer teardown

7 years agoRemoved IFF_NO_PI from TUN linux
Mathias Hall-Andersen [Mon, 4 Dec 2017 20:39:06 +0000 (21:39 +0100)] 
Removed IFF_NO_PI from TUN linux

This change was needed for the Linux TUN status hack
to work properly (not increment the error counter).

This commit also updates the TUN interface to allow for
the construction / removal of the TUN info headers in-place.

7 years agoRemoved profiler code
Mathias Hall-Andersen [Fri, 1 Dec 2017 23:00:45 +0000 (00:00 +0100)] 
Removed profiler code

7 years agoMore consistent use of signal struct
Mathias Hall-Andersen [Fri, 1 Dec 2017 22:37:26 +0000 (23:37 +0100)] 
More consistent use of signal struct

7 years agoFixed receive path infinite loop
Mathias Hall-Andersen [Thu, 30 Nov 2017 23:03:06 +0000 (00:03 +0100)] 
Fixed receive path infinite loop

7 years agoAdded missing exit codes
Mathias Hall-Andersen [Thu, 30 Nov 2017 22:30:29 +0000 (23:30 +0100)] 
Added missing exit codes

7 years agoRefactor timers.go
Mathias Hall-Andersen [Thu, 30 Nov 2017 22:22:40 +0000 (23:22 +0100)] 
Refactor timers.go

7 years agoFixed typos
Mathias Hall-Andersen [Wed, 29 Nov 2017 20:12:09 +0000 (21:12 +0100)] 
Fixed typos

7 years agoAdded cross namespace TUN status detection
Mathias Hall-Andersen [Wed, 29 Nov 2017 17:46:31 +0000 (18:46 +0100)] 
Added cross namespace TUN status detection

7 years agoBetter naming of bind helpers
Mathias Hall-Andersen [Sun, 19 Nov 2017 12:35:17 +0000 (13:35 +0100)] 
Better naming of bind helpers

7 years agoMerge branch 'source-caching'
Mathias Hall-Andersen [Sun, 19 Nov 2017 12:19:07 +0000 (13:19 +0100)] 
Merge branch 'source-caching'

7 years agoImplemented missing methods for Bind and Endpoint
Mathias Hall-Andersen [Sun, 19 Nov 2017 12:14:15 +0000 (13:14 +0100)] 
Implemented missing methods for Bind and Endpoint

7 years agoBegin generic Bind implementation
Mathias Hall-Andersen [Sat, 18 Nov 2017 23:21:58 +0000 (00:21 +0100)] 
Begin generic Bind implementation

7 years agoMoved endpoint into interface and simplified peer
Mathias Hall-Andersen [Sat, 18 Nov 2017 22:34:02 +0000 (23:34 +0100)] 
Moved endpoint into interface and simplified peer