]> git.ipfire.org Git - thirdparty/wireguard-go.git/log
thirdparty/wireguard-go.git
7 years agoFix Sscanf use in tun_darwin
Filippo Valsorda [Mon, 21 May 2018 03:38:58 +0000 (23:38 -0400)] 
Fix Sscanf use in tun_darwin

License: MIT
Signed-off-by: Filippo Valsorda <valsorda@google.com>
7 years agoMake successful tests silent
Filippo Valsorda [Mon, 21 May 2018 03:18:25 +0000 (23:18 -0400)] 
Make successful tests silent

License: MIT
Signed-off-by: Filippo Valsorda <valsorda@google.com>
7 years agoProperly close DummyTUN to avoid deadlock in TestNoiseHandshake
Filippo Valsorda [Mon, 21 May 2018 03:12:55 +0000 (23:12 -0400)] 
Properly close DummyTUN to avoid deadlock in TestNoiseHandshake

License: MIT
Signed-off-by: Filippo Valsorda <valsorda@google.com>
7 years agoUser cookie is closer to fwmark than setfib
Jason A. Donenfeld [Mon, 21 May 2018 18:13:39 +0000 (20:13 +0200)] 
User cookie is closer to fwmark than setfib

7 years agoRemove broken windows cruft
Jason A. Donenfeld [Mon, 21 May 2018 17:00:58 +0000 (19:00 +0200)] 
Remove broken windows cruft

7 years agoRework freebsd support
Jason A. Donenfeld [Mon, 21 May 2018 15:27:18 +0000 (17:27 +0200)] 
Rework freebsd support

7 years agoAdd FreeBSD support
Brady OBrien [Thu, 17 May 2018 22:58:54 +0000 (17:58 -0500)] 
Add FreeBSD support

Signed-off-by: Brady OBrien <brady.obrien128@gmail.com>
7 years agoClose events channel when no status listener
Jason A. Donenfeld [Mon, 21 May 2018 12:16:46 +0000 (14:16 +0200)] 
Close events channel when no status listener

7 years agoStraighten out UAPI logging
Jason A. Donenfeld [Mon, 21 May 2018 01:38:50 +0000 (03:38 +0200)] 
Straighten out UAPI logging

7 years agoClose hack listener before closing channel
Jason A. Donenfeld [Mon, 21 May 2018 01:31:44 +0000 (03:31 +0200)] 
Close hack listener before closing channel

7 years agoratelimiter: do not run GC with nothing to do
Jason A. Donenfeld [Mon, 21 May 2018 01:18:56 +0000 (03:18 +0200)] 
ratelimiter: do not run GC with nothing to do

7 years agoReasonable punctuation given the spacing
Jason A. Donenfeld [Mon, 21 May 2018 00:50:39 +0000 (02:50 +0200)] 
Reasonable punctuation given the spacing

7 years agoFix data races in timers
Jason A. Donenfeld [Sun, 20 May 2018 04:50:07 +0000 (06:50 +0200)] 
Fix data races in timers

7 years agoFix race with closing event channel
Jason A. Donenfeld [Sun, 20 May 2018 04:38:39 +0000 (06:38 +0200)] 
Fix race with closing event channel

There's still a tiny race on Linux, since the tun channel is written to
from two places.

7 years agoStyle
Jason A. Donenfeld [Sun, 20 May 2018 04:29:46 +0000 (06:29 +0200)] 
Style

7 years agoRemove unused mtu variable
Jason A. Donenfeld [Sun, 20 May 2018 04:25:39 +0000 (06:25 +0200)] 
Remove unused mtu variable

7 years agoGive bind its own wait group
Jason A. Donenfeld [Sun, 20 May 2018 04:19:29 +0000 (06:19 +0200)] 
Give bind its own wait group

In a waitgroup, all waits must come after all adds

7 years agoAvoid deadlock when the mutex isn't required, since these are atomics
Jason A. Donenfeld [Sun, 20 May 2018 03:55:52 +0000 (05:55 +0200)] 
Avoid deadlock when the mutex isn't required, since these are atomics

Maybe this fixes the "double lock issue" in
f73d2fb2d96bc3fbc8bc4cce452e3c19689de01e?

7 years agoUse proper status listener on Darwin
Jason A. Donenfeld [Sun, 20 May 2018 03:43:22 +0000 (05:43 +0200)] 
Use proper status listener on Darwin

7 years agoReduce the hack listener to once a second
Jason A. Donenfeld [Sun, 20 May 2018 02:03:11 +0000 (04:03 +0200)] 
Reduce the hack listener to once a second

7 years agoFix race in netlink peer correlator
Jason A. Donenfeld [Sun, 20 May 2018 01:37:33 +0000 (03:37 +0200)] 
Fix race in netlink peer correlator

7 years agoFix race in lock pending
Jason A. Donenfeld [Sun, 20 May 2018 01:31:27 +0000 (03:31 +0200)] 
Fix race in lock pending

7 years agoFix race in stats
Jason A. Donenfeld [Sun, 20 May 2018 01:26:46 +0000 (03:26 +0200)] 
Fix race in stats

7 years agoFix race in packetInNonceQueueIsAwaitingKey
Jason A. Donenfeld [Sun, 20 May 2018 01:24:14 +0000 (03:24 +0200)] 
Fix race in packetInNonceQueueIsAwaitingKey

7 years agoDiscourage building for Linux
Jason A. Donenfeld [Sun, 20 May 2018 01:18:47 +0000 (03:18 +0200)] 
Discourage building for Linux

7 years agoRevert "Temporary work around. Please revert me" 0.0.20180519
Jason A. Donenfeld [Sat, 19 May 2018 00:35:56 +0000 (02:35 +0200)] 
Revert "Temporary work around. Please revert me"

This reverts commit 4312a7c70a58656891ff1398f2d0d36f4ed74c8a.

7 years agotimers: no need to clear keepalive in persistent keepalive
Jason A. Donenfeld [Fri, 18 May 2018 23:52:17 +0000 (01:52 +0200)] 
timers: no need to clear keepalive in persistent keepalive

We do this after sending the keepalive anyway.

This is something of a regression, though, since before we'd cancel and
then send, but now we send and then cancel, so it introduces a potential
race, but hopefully that isn't too big of a deal.

Kernel module commit a24b3e6e15ae1ea1291666e5da910caf43eedbaf

7 years agotimers: clear send_keepalive timer on sending handshake response
Jason A. Donenfeld [Fri, 18 May 2018 23:19:53 +0000 (01:19 +0200)] 
timers: clear send_keepalive timer on sending handshake response

We reorganize this into also doing so on sending keepalives itself,
which means the state machine is much more consistent, even if this was
already implied.

Kernel module commit 30290ef1d2581a3e6ee8ffcdb05d580cfba976be

7 years agoListen for flush in outer select
Mathias Hall-Andersen [Fri, 18 May 2018 22:35:49 +0000 (00:35 +0200)] 
Listen for flush in outer select

Now listen for flushNonceQueue signal in outer select during
the RoutineNonce routine. This is needed to handle the edge case
where the queue is flushed, but no packets are in the nonce queue.
Since the signal has capacity 1 this signal will remain and potentially
flush the queue at a later time, with packets meant for transmission.

7 years agoAdd copyright headers
Mathias Hall-Andersen [Fri, 18 May 2018 22:34:56 +0000 (00:34 +0200)] 
Add copyright headers

7 years agoAvoid using v6-mapped-v4
Jason A. Donenfeld [Fri, 18 May 2018 03:02:35 +0000 (05:02 +0200)] 
Avoid using v6-mapped-v4

7 years agoStyle
Jason A. Donenfeld [Fri, 18 May 2018 01:56:27 +0000 (03:56 +0200)] 
Style

7 years agoFill out readme
Jason A. Donenfeld [Wed, 16 May 2018 21:25:59 +0000 (23:25 +0200)] 
Fill out readme

7 years agoFiner-grained start-stop synchronization
Jason A. Donenfeld [Wed, 16 May 2018 20:20:15 +0000 (22:20 +0200)] 
Finer-grained start-stop synchronization

7 years agoFix dir permissions 0.0.20180514
Jason A. Donenfeld [Tue, 15 May 2018 17:57:43 +0000 (19:57 +0200)] 
Fix dir permissions

7 years agoTemporary work around. Please revert me
Jason A. Donenfeld [Tue, 15 May 2018 17:56:06 +0000 (19:56 +0200)] 
Temporary work around. Please revert me

7 years agoLock timers on modification
Jason A. Donenfeld [Tue, 15 May 2018 16:38:18 +0000 (18:38 +0200)] 
Lock timers on modification

7 years agoAvoid vendoring tooling as much as possible
Jason A. Donenfeld [Tue, 15 May 2018 13:26:06 +0000 (15:26 +0200)] 
Avoid vendoring tooling as much as possible

7 years agoAdd vendoring for Homebrew
Jason A. Donenfeld [Tue, 15 May 2018 12:21:33 +0000 (14:21 +0200)] 
Add vendoring for Homebrew

7 years agoDo not send keepalive if closed
Jason A. Donenfeld [Tue, 15 May 2018 11:29:52 +0000 (13:29 +0200)] 
Do not send keepalive if closed

7 years agoFix refactoring mistakes
Jason A. Donenfeld [Tue, 15 May 2018 04:28:42 +0000 (06:28 +0200)] 
Fix refactoring mistakes

7 years agoImprove makefile
Jason A. Donenfeld [Tue, 15 May 2018 00:15:16 +0000 (02:15 +0200)] 
Improve makefile

7 years agoUse /dev/null as place holder
Jason A. Donenfeld [Mon, 14 May 2018 18:06:33 +0000 (20:06 +0200)] 
Use /dev/null as place holder

7 years agoPrint utun name on darwin
Jason A. Donenfeld [Mon, 14 May 2018 17:23:44 +0000 (19:23 +0200)] 
Print utun name on darwin

7 years agoMask IPs when showing from trie
Jason A. Donenfeld [Mon, 14 May 2018 15:57:58 +0000 (17:57 +0200)] 
Mask IPs when showing from trie

Otherwise intermediate nodes that get collapsed to real nodes will
display the wrong value.

7 years agoUgly hack to suppress warning on backgrounded process
Jason A. Donenfeld [Mon, 14 May 2018 13:58:40 +0000 (15:58 +0200)] 
Ugly hack to suppress warning on backgrounded process

7 years agoBetter common bits function
Jason A. Donenfeld [Mon, 14 May 2018 13:49:20 +0000 (15:49 +0200)] 
Better common bits function

7 years agoFix noise test
Jason A. Donenfeld [Mon, 14 May 2018 12:47:31 +0000 (14:47 +0200)] 
Fix noise test

7 years agoCancelable netlink writes and better response correlation
Jason A. Donenfeld [Mon, 14 May 2018 12:18:26 +0000 (14:18 +0200)] 
Cancelable netlink writes and better response correlation

7 years agoNetlink sockets can't be shutdown
Jason A. Donenfeld [Mon, 14 May 2018 12:08:03 +0000 (14:08 +0200)] 
Netlink sockets can't be shutdown

7 years agoCleanup socket file
Jason A. Donenfeld [Mon, 14 May 2018 10:46:06 +0000 (12:46 +0200)] 
Cleanup socket file

7 years agoClean more
Jason A. Donenfeld [Mon, 14 May 2018 10:27:29 +0000 (12:27 +0200)] 
Clean more

7 years agoNo more finalizer for rwcancel
Jason A. Donenfeld [Mon, 14 May 2018 04:10:08 +0000 (06:10 +0200)] 
No more finalizer for rwcancel

7 years agoNo need for padding any more
Jason A. Donenfeld [Mon, 14 May 2018 02:36:20 +0000 (04:36 +0200)] 
No need for padding any more

7 years agoShorthand for empty channels
Jason A. Donenfeld [Mon, 14 May 2018 02:19:25 +0000 (04:19 +0200)] 
Shorthand for empty channels

7 years agoAllow go routine to shutdown in darwin tun
Jason A. Donenfeld [Mon, 14 May 2018 02:14:57 +0000 (04:14 +0200)] 
Allow go routine to shutdown in darwin tun

7 years agoAdd rwcancelation to darwin
Jason A. Donenfeld [Mon, 14 May 2018 01:55:46 +0000 (03:55 +0200)] 
Add rwcancelation to darwin

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