]> git.ipfire.org Git - thirdparty/wireguard-go.git/log
thirdparty/wireguard-go.git
6 years agoAdd support for setupapi.SetupDiGetDeviceInfoListDetail()
Simon Rozman [Fri, 1 Feb 2019 10:39:57 +0000 (11:39 +0100)] 
Add support for setupapi.SetupDiGetDeviceInfoListDetail()

Signed-off-by: Simon Rozman <simon@rozman.si>
6 years agoFinish support for setupapi.SetupDiGetClassDevsEx()
Simon Rozman [Fri, 1 Feb 2019 09:58:06 +0000 (10:58 +0100)] 
Finish support for setupapi.SetupDiGetClassDevsEx()

Signed-off-by: Simon Rozman <simon@rozman.si>
6 years agoIntroduce SetupAPI - Windows device and driver management API
Simon Rozman [Thu, 31 Jan 2019 14:20:11 +0000 (15:20 +0100)] 
Introduce SetupAPI - Windows device and driver management API

Signed-off-by: Simon Rozman <simon@rozman.si>
6 years agoImport windows scafolding
Jason A. Donenfeld [Mon, 4 Feb 2019 16:29:52 +0000 (17:29 +0100)] 
Import windows scafolding

6 years agonoise: store clamped key instead of raw key
Jason A. Donenfeld [Sun, 3 Feb 2019 21:00:36 +0000 (22:00 +0100)] 
noise: store clamped key instead of raw key

6 years agotai64n: whiten nano seconds
Jason A. Donenfeld [Sun, 3 Feb 2019 01:08:16 +0000 (02:08 +0100)] 
tai64n: whiten nano seconds

Avoid being too precise of a time oracle.

6 years agouapi: Simpler function signature
Jason A. Donenfeld [Wed, 23 Jan 2019 21:05:07 +0000 (22:05 +0100)] 
uapi: Simpler function signature

6 years agoExtend structs rather than embed, when possible
Jason A. Donenfeld [Thu, 3 Jan 2019 18:04:00 +0000 (19:04 +0100)] 
Extend structs rather than embed, when possible

6 years agoUpdate copyright
Jason A. Donenfeld [Wed, 2 Jan 2019 00:55:51 +0000 (01:55 +0100)] 
Update copyright

6 years agoProperly bubble up setsockopt error from closure
Jason A. Donenfeld [Tue, 25 Dec 2018 21:56:36 +0000 (22:56 +0100)] 
Properly bubble up setsockopt error from closure

6 years agoversion: bump snapshot 0.0.20181222
Jason A. Donenfeld [Sat, 22 Dec 2018 16:34:23 +0000 (17:34 +0100)] 
version: bump snapshot

6 years agoMake error messages consistent
Jason A. Donenfeld [Tue, 18 Dec 2018 23:35:53 +0000 (00:35 +0100)] 
Make error messages consistent

6 years agoFreebsd is finally normal in sys/unix
Jason A. Donenfeld [Tue, 11 Dec 2018 17:33:13 +0000 (18:33 +0100)] 
Freebsd is finally normal in sys/unix

6 years agoSeparate out mark setting for Windows
Jason A. Donenfeld [Tue, 11 Dec 2018 17:21:11 +0000 (18:21 +0100)] 
Separate out mark setting for Windows

6 years agoUse upstream's xchacha20poly1305
Jason A. Donenfeld [Mon, 10 Dec 2018 03:23:17 +0000 (04:23 +0100)] 
Use upstream's xchacha20poly1305

6 years agoUpdate go x/ libraries
Jason A. Donenfeld [Mon, 10 Dec 2018 01:00:03 +0000 (02:00 +0100)] 
Update go x/ libraries

Android 9's Bionic disallows inotify_init with seccomp, so we want the
latest unix change, and while we're at it, we update the others too.

Reported-by: Berk D. Demir <bdd@mindcast.org>
Go CL: https://go-review.googlesource.com/c/sys/+/153318
Fixes: https://lists.zx2c4.com/pipermail/wireguard/2018-December/003642.html
6 years agotun: remove nonblock hack for linux
Jason A. Donenfeld [Thu, 6 Dec 2018 16:17:51 +0000 (17:17 +0100)] 
tun: remove nonblock hack for linux

This is no longer necessary and actually breaks things

Reported-by: Chris Branch <cbranch@cloudflare.com>
6 years agotai64n: use proper nanoseconds offset
Jason A. Donenfeld [Thu, 8 Nov 2018 02:58:01 +0000 (03:58 +0100)] 
tai64n: use proper nanoseconds offset

The code before was obviously wrong.

Reported-by: Vlad Krasnov <vlad@cloudflare.com>
6 years agoUse darwin tun on ios
Jason A. Donenfeld [Tue, 6 Nov 2018 15:24:35 +0000 (16:24 +0100)] 
Use darwin tun on ios

6 years agouapi: typo
Jason A. Donenfeld [Mon, 5 Nov 2018 04:46:27 +0000 (05:46 +0100)] 
uapi: typo

6 years agoreceive: make started status uniform
Jason A. Donenfeld [Thu, 1 Nov 2018 18:54:25 +0000 (19:54 +0100)] 
receive: make started status uniform

6 years agosend: do not unlock already freed object
Jason A. Donenfeld [Thu, 18 Oct 2018 16:15:24 +0000 (18:15 +0200)] 
send: do not unlock already freed object

6 years agoversion: bump snapshot 0.0.20181018
Jason A. Donenfeld [Thu, 18 Oct 2018 00:38:29 +0000 (02:38 +0200)] 
version: bump snapshot

6 years agoMakefile: rename default to all
Jason A. Donenfeld [Wed, 17 Oct 2018 19:45:16 +0000 (21:45 +0200)] 
Makefile: rename default to all

6 years agotun: only call .Fd() once
Jason A. Donenfeld [Wed, 17 Oct 2018 19:26:53 +0000 (21:26 +0200)] 
tun: only call .Fd() once

Doing so tends to make the tunnel blocking, so we only retrieve it once
before we call SetNonblock, and then cache the result.

6 years agoUse go modules always
Jason A. Donenfeld [Thu, 11 Oct 2018 23:45:33 +0000 (01:45 +0200)] 
Use go modules always

6 years agoDo not build if nothing to do
Jason A. Donenfeld [Thu, 11 Oct 2018 23:12:00 +0000 (01:12 +0200)] 
Do not build if nothing to do

6 years agoSwitch to go modules
Jason A. Donenfeld [Tue, 9 Oct 2018 16:11:36 +0000 (18:11 +0200)] 
Switch to go modules

6 years agoversion: bump snapshot 0.0.20181001
Jason A. Donenfeld [Mon, 1 Oct 2018 15:58:31 +0000 (17:58 +0200)] 
version: bump snapshot

6 years agoAdding missing queueconstants file
Jason A. Donenfeld [Mon, 1 Oct 2018 14:11:31 +0000 (16:11 +0200)] 
Adding missing queueconstants file

6 years agoFix transport message length check
Chris Branch [Thu, 20 Sep 2018 12:28:53 +0000 (13:28 +0100)] 
Fix transport message length check

wireguard-go has a bad length check in its transport message handling.
Although it cannot be exploited because of another length check earlier in the
function, this should be fixed regardless.

6 years agoMake it easy to restrict queue sizes more
Jason A. Donenfeld [Tue, 25 Sep 2018 00:31:02 +0000 (02:31 +0200)] 
Make it easy to restrict queue sizes more

6 years agoFix shutdown races
Jason A. Donenfeld [Sun, 23 Sep 2018 23:52:02 +0000 (01:52 +0200)] 
Fix shutdown races

6 years agoMore pooling
Jason A. Donenfeld [Sat, 22 Sep 2018 04:29:02 +0000 (06:29 +0200)] 
More pooling

6 years agoFixup buffer freeing
Jason A. Donenfeld [Sun, 16 Sep 2018 22:43:23 +0000 (00:43 +0200)] 
Fixup buffer freeing

6 years agosend: more precise padding calculation
Jason A. Donenfeld [Sun, 16 Sep 2018 21:42:31 +0000 (23:42 +0200)] 
send: more precise padding calculation

6 years agodevice: preallocated buffers scheme
Jason A. Donenfeld [Sun, 16 Sep 2018 21:10:19 +0000 (23:10 +0200)] 
device: preallocated buffers scheme

Not useful now but quite possibly later.

6 years agoChange queueing drop order and fix memory leaks
Jason A. Donenfeld [Sun, 16 Sep 2018 19:50:58 +0000 (21:50 +0200)] 
Change queueing drop order and fix memory leaks

If the queues are full, we drop the present packet, which is better for
network traffic flow. Also, we try to fix up the memory leaks with not
putting buffers from our shared pool.

6 years agosend: use accessor function for buffer pool
Jason A. Donenfeld [Sun, 16 Sep 2018 15:30:46 +0000 (17:30 +0200)] 
send: use accessor function for buffer pool

6 years agoFixed port overwrite issue on kernels without ipv6
Mathias Hall-Andersen [Sun, 16 Sep 2018 13:05:08 +0000 (15:05 +0200)] 
Fixed port overwrite issue on kernels without ipv6

Fixed an issue in CreateBind for Linux:
If ipv6 was not supported the error code would be
correctly identified as EAFNOSUPPORT and ipv4 binding attempted.
However the port would be set to 0,
which results in the subsequent create4 call requesting
a random port rather than the one provided to CreateBind.

This issue was identified by:
Kent Friis <leeloored@gmx.com>

6 years agoglobal: fix up copyright headers
Jason A. Donenfeld [Wed, 5 Sep 2018 21:54:31 +0000 (15:54 -0600)] 
global: fix up copyright headers

6 years agouapi: insert peer version placeholder
Jason A. Donenfeld [Mon, 3 Sep 2018 05:04:47 +0000 (23:04 -0600)] 
uapi: insert peer version placeholder

While we don't want people to ever use old protocols, people will
complain if the API "changes", so explicitly make the unset protocol
mean the latest, and add a dummy mechanism of specifying the protocol on
a per-peer basis, which we hope nobody actually ever uses.

7 years agoFix duplicate copyright line
Jason A. Donenfeld [Mon, 30 Jul 2018 03:14:17 +0000 (05:14 +0200)] 
Fix duplicate copyright line

7 years agouapi: allow overriding socket directory at compile time
Jason A. Donenfeld [Tue, 24 Jul 2018 12:32:02 +0000 (14:32 +0200)] 
uapi: allow overriding socket directory at compile time

7 years agosend: better debug message for failed data packet
Jason A. Donenfeld [Mon, 16 Jul 2018 14:05:21 +0000 (16:05 +0200)] 
send: better debug message for failed data packet

7 years agoversion: bump snapshot 0.0.20180613
Jason A. Donenfeld [Wed, 13 Jun 2018 14:21:59 +0000 (16:21 +0200)] 
version: bump snapshot

7 years agoSupport IPv6-less kernels
Jason A. Donenfeld [Mon, 11 Jun 2018 17:04:38 +0000 (19:04 +0200)] 
Support IPv6-less kernels

7 years agoDo not build tun device on ios
Jason A. Donenfeld [Sat, 9 Jun 2018 01:31:17 +0000 (03:31 +0200)] 
Do not build tun device on ios

7 years agoFix duplicated wording
Jason A. Donenfeld [Sat, 2 Jun 2018 15:36:35 +0000 (17:36 +0200)] 
Fix duplicated wording

7 years agoMakefile: export PWD for OpenBSD's ksh(1)
Jason A. Donenfeld [Sat, 2 Jun 2018 14:25:19 +0000 (16:25 +0200)] 
Makefile: export PWD for OpenBSD's ksh(1)

Interestingly, ksh(1) on OpenBSD does not export PWD by default, and it
also has a notion of the "logical cwd" vs the "physical cwd", with the
latter being passed to chdir, but the former being stored in the
non-exported PWD and displayed to the user. This means that if you `cd`
into a directory that's comprised of symlinks, exec'd processes will see
the physical path. Observe:

  # ksh
  # mkdir a
  # ln -s a b
  # cd b
  # pwd
  /root/b
  # ksh -c pwd
  /root/a

The fact of separating physical and logical paths is not too uncommon
for shells (bash does it too), but not exporting PWD is very odd.

Since this is common behavior for many shells, libraries that return the
working directory will do something strange: they `stat(".")` and then
`stat(getenv("PWD"))`, and if these point to the same inode, they roll
with the value of `getenv("PWD")`, or otherwise fallback to asking the
kernel for the cwd.

Since PWD was not exported by ksh(1), Go's dep utility did not understand
it was operating inside of our faked GOPATH and became upset.

This patch works around the whole situation by simply exporting PWD
before executing dep.

7 years agoversion: bump snapshot 0.0.20180531
Jason A. Donenfeld [Thu, 31 May 2018 00:26:07 +0000 (02:26 +0200)] 
version: bump snapshot

7 years agoPrint version number in log
Jason A. Donenfeld [Tue, 29 May 2018 23:09:18 +0000 (01:09 +0200)] 
Print version number in log

7 years agoUpdate deps
Jason A. Donenfeld [Sun, 27 May 2018 23:39:37 +0000 (01:39 +0200)] 
Update deps

7 years agoFix typo in timers
Jason A. Donenfeld [Sun, 27 May 2018 20:55:01 +0000 (22:55 +0200)] 
Fix typo in timers

7 years agoDisable broadcast mode on *BSD
Jason A. Donenfeld [Sun, 27 May 2018 00:26:56 +0000 (02:26 +0200)] 
Disable broadcast mode on *BSD

Keeping it on makes IPv6 problematic and confuses routing daemons.

7 years agoDisappointing anti-sticky experiment
Jason A. Donenfeld [Sat, 26 May 2018 00:59:26 +0000 (02:59 +0200)] 
Disappointing anti-sticky experiment

7 years agoFix tests
Jason A. Donenfeld [Thu, 24 May 2018 17:58:16 +0000 (19:58 +0200)] 
Fix tests

7 years agoTrick for being extra sensitive to route changes
Jason A. Donenfeld [Thu, 24 May 2018 16:00:45 +0000 (18:00 +0200)] 
Trick for being extra sensitive to route changes

7 years agoBack to sticky sockets on android
Jason A. Donenfeld [Thu, 24 May 2018 15:53:00 +0000 (17:53 +0200)] 
Back to sticky sockets on android

7 years agoDo not build on Linux
Jason A. Donenfeld [Thu, 24 May 2018 14:41:42 +0000 (16:41 +0200)] 
Do not build on Linux

7 years agoCatch EINTR
Jason A. Donenfeld [Thu, 24 May 2018 13:29:16 +0000 (15:29 +0200)] 
Catch EINTR

7 years agoRemove old makefile artifact
Jason A. Donenfeld [Thu, 24 May 2018 01:13:46 +0000 (03:13 +0200)] 
Remove old makefile artifact

7 years agoversion: bump snapshot 0.0.20180524
Jason A. Donenfeld [Thu, 24 May 2018 00:25:51 +0000 (02:25 +0200)] 
version: bump snapshot

7 years agoAdd undocumented --version flag
Jason A. Donenfeld [Wed, 23 May 2018 23:52:22 +0000 (01:52 +0200)] 
Add undocumented --version flag

7 years agoEye before ee except after see
Jason A. Donenfeld [Wed, 23 May 2018 17:00:00 +0000 (19:00 +0200)] 
Eye before ee except after see

7 years agoNo zero sequence numbers
Jason A. Donenfeld [Wed, 23 May 2018 16:30:55 +0000 (18:30 +0200)] 
No zero sequence numbers

7 years agoDon't cause a new fake gopath to call dep
Jason A. Donenfeld [Wed, 23 May 2018 15:30:35 +0000 (17:30 +0200)] 
Don't cause a new fake gopath to call dep

7 years agoInfoleak ifnames and be more permissive
Jason A. Donenfeld [Wed, 23 May 2018 13:38:24 +0000 (15:38 +0200)] 
Infoleak ifnames and be more permissive

Listing interfaces is already permitted by the OS, so we allow this info
leak too.

7 years agoAdopt GOPATH
Jason A. Donenfeld [Wed, 23 May 2018 01:17:51 +0000 (03:17 +0200)] 
Adopt GOPATH

GOPATH is annoying, but the Go community pushing me to adopt it is even
more annoying.

7 years agoRemove more windows cruft
Jason A. Donenfeld [Wed, 23 May 2018 02:35:37 +0000 (04:35 +0200)] 
Remove more windows cruft

7 years agoCleanup
Jason A. Donenfeld [Wed, 23 May 2018 00:41:41 +0000 (02:41 +0200)] 
Cleanup

7 years agoMove replay into subpackage
Jason A. Donenfeld [Wed, 23 May 2018 00:32:02 +0000 (02:32 +0200)] 
Move replay into subpackage

7 years agoMove tun to subpackage
Jason A. Donenfeld [Wed, 23 May 2018 00:10:54 +0000 (02:10 +0200)] 
Move tun to subpackage

7 years agoAvoid sticky sockets on Android
Jason A. Donenfeld [Tue, 22 May 2018 17:40:51 +0000 (19:40 +0200)] 
Avoid sticky sockets on Android

The android policy routing system does insane things.

7 years agoFix integer conversions
Jason A. Donenfeld [Tue, 22 May 2018 16:33:50 +0000 (18:33 +0200)] 
Fix integer conversions

7 years agoBump dependencies for OpenBSD
Jason A. Donenfeld [Tue, 22 May 2018 15:58:34 +0000 (17:58 +0200)] 
Bump dependencies for OpenBSD

7 years agoFix markdown
Jason A. Donenfeld [Tue, 22 May 2018 14:47:15 +0000 (16:47 +0200)] 
Fix markdown

7 years agoAdd OpenBSD tun driver support
Jason A. Donenfeld [Tue, 22 May 2018 13:17:35 +0000 (15:17 +0200)] 
Add OpenBSD tun driver support

7 years agoFix code duplication
Jason A. Donenfeld [Tue, 22 May 2018 12:59:29 +0000 (14:59 +0200)] 
Fix code duplication

7 years agoNotes on FreeBSD limitations
Jason A. Donenfeld [Mon, 21 May 2018 23:30:16 +0000 (01:30 +0200)] 
Notes on FreeBSD limitations

7 years agoJust in case darwin changes, we also shutdown
Jason A. Donenfeld [Mon, 21 May 2018 23:27:29 +0000 (01:27 +0200)] 
Just in case darwin changes, we also shutdown

7 years agoCall shutdown on route socket on freebsd
Jason A. Donenfeld [Mon, 21 May 2018 23:26:47 +0000 (01:26 +0200)] 
Call shutdown on route socket on freebsd

7 years agoMinor main.go signal fixes
Filippo Valsorda [Mon, 21 May 2018 03:39:25 +0000 (23:39 -0400)] 
Minor main.go signal fixes

* Buffer the signal channel as it's non-blocking on the sender side
* Notify on SIGTERM instead of the uncatchable SIGKILL

License: MIT
Signed-off-by: Filippo Valsorda <valsorda@google.com>
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