]> git.ipfire.org Git - thirdparty/wireguard-tools.git/log
thirdparty/wireguard-tools.git
7 years agowg: uapi: only make sure socket file is socket
Jason A. Donenfeld [Tue, 26 Sep 2017 13:02:41 +0000 (15:02 +0200)] 
wg: uapi: only make sure socket file is socket

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
7 years agowg: use key_is_zero for comparing to zeros
Jason A. Donenfeld [Fri, 22 Sep 2017 02:04:00 +0000 (04:04 +0200)] 
wg: use key_is_zero for comparing to zeros

Maybe an attacker on the system could use the infoleak in /proc to gauge
how long a wg(8) process takes to complete and determine the number of
leading zeros. This is somewhat ridiculous, but it's possible somebody
somewhere might at somepoint care in the future, so alright.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
7 years agocontrib: add sticky sockets example code
Jason A. Donenfeld [Tue, 19 Sep 2017 21:17:56 +0000 (23:17 +0200)] 
contrib: add sticky sockets example code

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
7 years agowg-quick: only bash complete existing interfaces for down
Jason A. Donenfeld [Wed, 6 Sep 2017 18:51:41 +0000 (20:51 +0200)] 
wg-quick: only bash complete existing interfaces for down

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
7 years agowg: fix removal of psk
Jason A. Donenfeld [Wed, 23 Aug 2017 18:51:52 +0000 (12:51 -0600)] 
wg: fix removal of psk

This is an attribute of the peer, not the device.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: stricter userspace ipc parsing
Jason A. Donenfeld [Wed, 2 Aug 2017 19:07:25 +0000 (21:07 +0200)] 
wg: stricter userspace ipc parsing

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agocontrib: move Android tools to wireguard-android repo
Jason A. Donenfeld [Mon, 31 Jul 2017 01:03:06 +0000 (03:03 +0200)] 
contrib: move Android tools to wireguard-android repo

https: //git.zx2c4.com/wireguard-android/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoandroid: fix readme
Jason A. Donenfeld [Wed, 26 Jul 2017 02:10:33 +0000 (04:10 +0200)] 
android: fix readme

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: add explicit support for common DNS usage
Jason A. Donenfeld [Wed, 26 Jul 2017 01:09:48 +0000 (03:09 +0200)] 
wg-quick: add explicit support for common DNS usage

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: do not use grep
Jason A. Donenfeld [Mon, 24 Jul 2017 21:22:10 +0000 (23:22 +0200)] 
wg-quick: do not use grep

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: do not set explicit src route for v6 default route
Jason A. Donenfeld [Mon, 24 Jul 2017 14:08:42 +0000 (16:08 +0200)] 
wg-quick: do not set explicit src route for v6 default route

This was only required because clueless network operators were trying to
route fec0::/10 globally, when that range doesn't actually have global
scope. Now that we understand the cause was operator error, we revert
the change here, so that the routing table is kept consistent.

This reverts commit 64e47de870a2f0575b5564a70e5680b48ab83ff9.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoandroid: add port of wg-quick
Jason A. Donenfeld [Thu, 20 Jul 2017 04:07:48 +0000 (06:07 +0200)] 
android: add port of wg-quick

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: usage typos
Jason A. Donenfeld [Thu, 20 Jul 2017 04:29:14 +0000 (06:29 +0200)] 
wg-quick: usage typos

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoglobal: wireguard.io --> wireguard.com
Jason A. Donenfeld [Sun, 16 Jul 2017 14:12:20 +0000 (16:12 +0200)] 
global: wireguard.io --> wireguard.com

Due to concerns with the .io TLD, we are switching to using
wireguard.com instead.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agogitignore: ignore split DWARF debug info
Samuel Holland [Wed, 31 May 2017 16:30:59 +0000 (11:30 -0500)] 
gitignore: ignore split DWARF debug info

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: remove double include in ipc
Jason A. Donenfeld [Thu, 29 Jun 2017 12:34:27 +0000 (14:34 +0200)] 
wg: remove double include in ipc

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: use printf -v instead of namerefs for bash 4.2
Jason A. Donenfeld [Tue, 27 Jun 2017 20:18:13 +0000 (22:18 +0200)] 
wg-quick: use printf -v instead of namerefs for bash 4.2

I'm not happy about this.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: properly match IPv6 endpoint
Jason A. Donenfeld [Fri, 23 Jun 2017 12:48:03 +0000 (14:48 +0200)] 
wg-quick: properly match IPv6 endpoint

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agohaskell: re-add updated haskell example
Jason A. Donenfeld [Tue, 13 Jun 2017 21:35:27 +0000 (23:35 +0200)] 
haskell: re-add updated haskell example

Code-from: John Galt <jgalt@centromere.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: use proper __linux__ ifdef
Jason A. Donenfeld [Mon, 12 Jun 2017 15:01:23 +0000 (17:01 +0200)] 
wg: use proper __linux__ ifdef

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: match ipv6 default route more broadly
Jason A. Donenfeld [Sun, 11 Jun 2017 22:20:31 +0000 (00:20 +0200)] 
wg-quick: match ipv6 default route more broadly

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: make sure we have empty table for both v6 and v4
Jason A. Donenfeld [Sun, 11 Jun 2017 21:39:17 +0000 (23:39 +0200)] 
wg-quick: make sure we have empty table for both v6 and v4

Otherwise, we wind up not doing the right thing in the v6-only case, or
doing something totally borked when v4 and v6 are filled unevenly.

Reported-by: Roelf Wichertjes <contact@roelf.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoexternal-tests: trim the fat
Jason A. Donenfeld [Fri, 9 Jun 2017 00:56:08 +0000 (02:56 +0200)] 
external-tests: trim the fat

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agogo test: use x/crypto for blake2s now that we have 128-bit mac
Jason A. Donenfeld [Tue, 6 Jun 2017 14:50:20 +0000 (16:50 +0200)] 
go test: use x/crypto for blake2s now that we have 128-bit mac

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agogo test: correct tai64n and formatting
Jason A. Donenfeld [Thu, 1 Jun 2017 17:08:24 +0000 (19:08 +0200)] 
go test: correct tai64n and formatting

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoexternal-tests: add keepalive packet
Jason A. Donenfeld [Thu, 1 Jun 2017 16:45:20 +0000 (18:45 +0200)] 
external-tests: add keepalive packet

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agogo test: properly pad message
Jason A. Donenfeld [Thu, 1 Jun 2017 04:31:26 +0000 (06:31 +0200)] 
go test: properly pad message

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: allow creating device with no peers
Jason A. Donenfeld [Tue, 30 May 2017 03:14:53 +0000 (05:14 +0200)] 
wg: allow creating device with no peers

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agorust test: add icmp ping
Jason A. Donenfeld [Mon, 29 May 2017 14:58:10 +0000 (16:58 +0200)] 
rust test: add icmp ping

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agorust test: convert screech test to snow
Jake McGinty [Mon, 29 May 2017 05:47:26 +0000 (13:47 +0800)] 
rust test: convert screech test to snow

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoman: update wg-quick(8) to show Debian resolvconf braindamage
Jason A. Donenfeld [Mon, 22 May 2017 11:28:02 +0000 (13:28 +0200)] 
man: update wg-quick(8) to show Debian resolvconf braindamage

While OpenResolv supports explicit ordering directives such as `-m` and
exclusivity directives such as `-x`, Debian's own resolvconf supports
none of this, instead using a hard coded list of interface name
templates for determining ordering. While trying to emulate `-x` is
difficult [*], we can at least try to mostly emulate `-m 0` by
masquerading as a `tun*` interface to resolvconf. Ugly, but it works.

[*] One heavy handed way of emulating `-x` would be something like:

   # echo nameserver 8.8.8.8 > /etc/resolv.conf.wg0-exclusive
   # mount --bind -o ro /etc/resolv.conf.wg0-exclusive /etc/resolv.conf
   # rm -f /etc/resolv.conf.wg0-exclusive

This in practice works quite well, but is a bit heavy to put in a man
page. It also doesn't "stack" well. For example, if we simply run
`umount /etc/resolv.conf`, how do we know which resolv.conf entry we're
unmounting?

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: use src routing for default routes in v6
Jason A. Donenfeld [Thu, 18 May 2017 12:40:26 +0000 (14:40 +0200)] 
wg-quick: use src routing for default routes in v6

Otherwise, traffic is sent with the IP address of a different interface,
and then packets don't actually get delivered.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoman: fix psk mention in wg-quick man page
Jason A. Donenfeld [Thu, 18 May 2017 11:37:31 +0000 (13:37 +0200)] 
man: fix psk mention in wg-quick man page

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: opt-in globally to GNU-isms to keep the BSDs happy
Jason A. Donenfeld [Wed, 17 May 2017 16:34:23 +0000 (18:34 +0200)] 
wg: opt-in globally to GNU-isms to keep the BSDs happy

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: support text-based ipc
Jason A. Donenfeld [Mon, 15 May 2017 21:24:48 +0000 (23:24 +0200)] 
wg: support text-based ipc

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: check for proto error on set too
Jason A. Donenfeld [Sun, 14 May 2017 17:29:59 +0000 (19:29 +0200)] 
wg: check for proto error on set too

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: stricter key file reading
Jason A. Donenfeld [Fri, 12 May 2017 13:03:38 +0000 (15:03 +0200)] 
wg: stricter key file reading

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agonoise: redesign preshared key mode
Jason A. Donenfeld [Thu, 27 Apr 2017 09:10:50 +0000 (11:10 +0200)] 
noise: redesign preshared key mode

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: auto MTU discovery
Jason A. Donenfeld [Mon, 24 Apr 2017 03:01:16 +0000 (05:01 +0200)] 
wg-quick: auto MTU discovery

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: retry name resolution on temporary failure
Jason A. Donenfeld [Mon, 24 Apr 2017 01:45:40 +0000 (03:45 +0200)] 
wg: retry name resolution on temporary failure

This should solve many problems at init time.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: no hyphen in preshared, to keep uniformity
Jason A. Donenfeld [Thu, 20 Apr 2017 18:21:50 +0000 (20:21 +0200)] 
wg: no hyphen in preshared, to keep uniformity

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: argc is always 1
Jason A. Donenfeld [Wed, 19 Apr 2017 14:53:13 +0000 (16:53 +0200)] 
wg: argc is always 1

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: check for malloc failure
Jason A. Donenfeld [Wed, 19 Apr 2017 14:51:24 +0000 (16:51 +0200)] 
wg: check for malloc failure

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: side channel resistant base64
Jason A. Donenfeld [Sat, 15 Apr 2017 23:20:43 +0000 (01:20 +0200)] 
wg: side channel resistant base64

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: do not use addrconfig with port in gai
Jason A. Donenfeld [Tue, 28 Mar 2017 08:46:31 +0000 (10:46 +0200)] 
wg: do not use addrconfig with port in gai

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agouapi: add version magic
Jason A. Donenfeld [Fri, 24 Mar 2017 03:01:25 +0000 (04:01 +0100)] 
uapi: add version magic

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: various cleanups
Jason A. Donenfeld [Thu, 23 Mar 2017 14:44:10 +0000 (15:44 +0100)] 
wg-quick: various cleanups

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: document # comments in wg(8) man page
Jason A. Donenfeld [Wed, 22 Mar 2017 12:11:41 +0000 (13:11 +0100)] 
wg: document # comments in wg(8) man page

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: support old ip(8)
Pim van Pelt [Thu, 16 Mar 2017 22:57:55 +0000 (23:57 +0100)] 
wg-quick: support old ip(8)

Old versions of ip(8) do not accept arguments to `ip rule show.` This
patch works around that limitation.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agocontrib: add wg-json utility
Jason A. Donenfeld [Thu, 23 Feb 2017 14:50:05 +0000 (15:50 +0100)] 
contrib: add wg-json utility

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: fix bash completion spaces
Jason A. Donenfeld [Thu, 23 Feb 2017 03:39:06 +0000 (04:39 +0100)] 
wg: fix bash completion spaces

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: add wg show [interface] dump
Jason A. Donenfeld [Wed, 22 Feb 2017 20:53:55 +0000 (21:53 +0100)] 
wg: add wg show [interface] dump

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: give "off" value for fwmark
Jason A. Donenfeld [Wed, 22 Feb 2017 20:45:03 +0000 (21:45 +0100)] 
wg: give "off" value for fwmark

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: allow config files without trailing newline
Jason A. Donenfeld [Wed, 22 Feb 2017 19:23:00 +0000 (20:23 +0100)] 
wg-quick: allow config files without trailing newline

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoextract-keys: respect compat directives
Jason A. Donenfeld [Mon, 20 Feb 2017 20:55:44 +0000 (21:55 +0100)] 
extract-keys: respect compat directives

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: unquote fwmark for bash 4.3
Jason A. Donenfeld [Tue, 14 Feb 2017 10:41:56 +0000 (11:41 +0100)] 
wg-quick: unquote fwmark for bash 4.3

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: set LC_ALL for consistent regex
Jason A. Donenfeld [Sun, 5 Feb 2017 22:05:12 +0000 (23:05 +0100)] 
wg-quick: set LC_ALL for consistent regex

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agosocket: enable setting of fwmark
Jason A. Donenfeld [Tue, 24 Jan 2017 16:43:35 +0000 (17:43 +0100)] 
socket: enable setting of fwmark

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agosocket: general ephemeral ports instead of name-based ports
Jason A. Donenfeld [Tue, 24 Jan 2017 04:59:17 +0000 (05:59 +0100)] 
socket: general ephemeral ports instead of name-based ports

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: support v6 dual stack
Jason A. Donenfeld [Tue, 24 Jan 2017 04:28:03 +0000 (05:28 +0100)] 
wg-quick: support v6 dual stack

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: remove key for any empty file
Jason A. Donenfeld [Tue, 24 Jan 2017 03:20:05 +0000 (04:20 +0100)] 
wg: remove key for any empty file

Rather than just using /dev/null to mean key removal, match on any empty
file, so that this interface is cross platform.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: setconf should remove existing psk
Jason A. Donenfeld [Tue, 24 Jan 2017 03:11:56 +0000 (04:11 +0100)] 
wg: setconf should remove existing psk

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: recommend using resolvconf in exclusive mode
Jason A. Donenfeld [Wed, 18 Jan 2017 23:07:31 +0000 (00:07 +0100)] 
wg-quick: recommend using resolvconf in exclusive mode

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: man: recommend correct port
Jason A. Donenfeld [Sun, 15 Jan 2017 21:22:45 +0000 (22:22 +0100)] 
wg: man: recommend correct port

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: parse IPv6 endpoints correctly
Jason A. Donenfeld [Sun, 15 Jan 2017 12:01:06 +0000 (13:01 +0100)] 
wg-quick: parse IPv6 endpoints correctly

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: better removal of suppress_prefix rule
Jason A. Donenfeld [Tue, 10 Jan 2017 23:29:58 +0000 (00:29 +0100)] 
wg-quick: better removal of suppress_prefix rule

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoUpdate copyright
Jason A. Donenfeld [Tue, 10 Jan 2017 05:36:19 +0000 (06:36 +0100)] 
Update copyright

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agouapi: use sockaddr union instead of sockaddr_storage
Jason A. Donenfeld [Tue, 10 Jan 2017 04:52:06 +0000 (05:52 +0100)] 
uapi: use sockaddr union instead of sockaddr_storage

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agouapi: use flag instead of C bitfield for portability
Jason A. Donenfeld [Tue, 10 Jan 2017 03:47:29 +0000 (19:47 -0800)] 
uapi: use flag instead of C bitfield for portability

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: ipc: read from socket incrementally
Jason A. Donenfeld [Tue, 10 Jan 2017 03:50:42 +0000 (04:50 +0100)] 
wg: ipc: read from socket incrementally

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: error on short ret reads
Jason A. Donenfeld [Sun, 8 Jan 2017 22:00:41 +0000 (23:00 +0100)] 
wg: error on short ret reads

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-quick: enforce good permissions
Jason A. Donenfeld [Thu, 5 Jan 2017 18:57:50 +0000 (19:57 +0100)] 
wg-quick: enforce good permissions

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: add installation note for distros
Jason A. Donenfeld [Thu, 5 Jan 2017 18:41:20 +0000 (19:41 +0100)] 
wg: add installation note for distros

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: remove DESTDIR for autodetection
Christian Hesse [Wed, 4 Jan 2017 20:14:16 +0000 (21:14 +0100)] 
wg: remove DESTDIR for autodetection

DESTDIR is always empty, no need to check anything there. Check the main
system instead.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: add systemd unit and auto-detection
Jason A. Donenfeld [Wed, 4 Jan 2017 18:28:28 +0000 (19:28 +0100)] 
wg: add systemd unit and auto-detection

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: add makefile instructions
Jason A. Donenfeld [Wed, 4 Jan 2017 17:20:08 +0000 (18:20 +0100)] 
wg: add makefile instructions

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: add wg-quick
Jason A. Donenfeld [Mon, 2 Jan 2017 04:33:43 +0000 (05:33 +0100)] 
wg: add wg-quick

This is based on wg-config, but is even easier to use, and now makes
our full tools suite.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: add bash completion for wg(8)
Jason A. Donenfeld [Wed, 4 Jan 2017 06:05:56 +0000 (07:05 +0100)] 
wg: add bash completion for wg(8)

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agocontrib: slight ncat tweak
Jason A. Donenfeld [Tue, 3 Jan 2017 04:23:17 +0000 (05:23 +0100)] 
contrib: slight ncat tweak

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: syscall.h should actually be sys/syscall.h
Jason A. Donenfeld [Fri, 30 Dec 2016 16:53:05 +0000 (17:53 +0100)] 
wg: syscall.h should actually be sys/syscall.h

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-config: use ip rules instead of tungate
Jason A. Donenfeld [Fri, 30 Dec 2016 16:50:19 +0000 (17:50 +0100)] 
wg-config: use ip rules instead of tungate

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoexternal-tests: update to latest
Jason A. Donenfeld [Sun, 25 Dec 2016 20:01:06 +0000 (21:01 +0100)] 
external-tests: update to latest

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: rename 'bandwidth' to 'transfer' in output
Tomasz Torcz [Fri, 23 Dec 2016 19:25:55 +0000 (20:25 +0100)] 
wg: rename 'bandwidth' to 'transfer' in output

'bandwidth' is a measure of speed, but wg's output shows only the
number of bytes transferred. Thus 'transfer' is a better label.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-config: cleanups
Jason A. Donenfeld [Wed, 21 Dec 2016 05:15:57 +0000 (06:15 +0100)] 
wg-config: cleanups

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: do not use AI_ADDRCONFIG
Jason A. Donenfeld [Tue, 20 Dec 2016 20:50:29 +0000 (21:50 +0100)] 
wg: do not use AI_ADDRCONFIG

Some people run wg(8) using hard coded v6 addresses before interfaces
have v6 addresses, causing getaddrinfo to fail. Since AI_ADDRCONFIG
doesn't actualy change the sorting, but just the queries made, we don't
really need AI_ADDRCONFIG anyway, since we're always only taking the
first result.

Reported-by: Benedikt Morbach <benedikt.morbach@googlemail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: allowed-ips is easier to parse with spaces instead of ", "
Jason A. Donenfeld [Tue, 20 Dec 2016 18:14:19 +0000 (19:14 +0100)] 
wg: allowed-ips is easier to parse with spaces instead of ", "

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg-config: cleanup ip parsing
Jason A. Donenfeld [Tue, 20 Dec 2016 03:08:41 +0000 (04:08 +0100)] 
wg-config: cleanup ip parsing

This also sorts routes by cidr.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: fix latest-handshake typo in documentation
Jason A. Donenfeld [Wed, 14 Dec 2016 21:18:29 +0000 (22:18 +0100)] 
wg: fix latest-handshake typo in documentation

Reported-by: Dan Lüdtke <mail@danrl.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agocontrib: add wg-config
Jason A. Donenfeld [Thu, 8 Dec 2016 15:13:25 +0000 (16:13 +0100)] 
contrib: add wg-config

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: warn about clock going backward
Jason A. Donenfeld [Tue, 29 Nov 2016 12:38:59 +0000 (13:38 +0100)] 
wg: warn about clock going backward

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoheaders: cleanup notices
Jason A. Donenfeld [Fri, 18 Nov 2016 05:22:00 +0000 (06:22 +0100)] 
headers: cleanup notices

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: chill modern gcc out
Jason A. Donenfeld [Sat, 5 Nov 2016 20:35:33 +0000 (21:35 +0100)] 
wg: chill modern gcc out

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoqemu: move build outside of kernel dir to avoid kernel's make clean
Jason A. Donenfeld [Sat, 5 Nov 2016 12:22:55 +0000 (13:22 +0100)] 
qemu: move build outside of kernel dir to avoid kernel's make clean

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: abstract pkg-config to PKG_CONFIG
Jason A. Donenfeld [Wed, 2 Nov 2016 10:50:52 +0000 (11:50 +0100)] 
wg: abstract pkg-config to PKG_CONFIG

Distros like Exherbo have multitarget setups with toolnames prefixed by
the arch.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: everybody hates automatic stripping
Jason A. Donenfeld [Wed, 2 Nov 2016 10:49:07 +0000 (11:49 +0100)] 
wg: everybody hates automatic stripping

I happen to like it, but package managers don't. The GNU standard [1]
says there should be a separate install-strip target. I don't like
duplicating code like that. So, instead, I'll just remove stripping all
together.

[1] https://www.gnu.org/prep/standards/html_node/Standard-Targets.html

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agogit: organize ignore files
Jason A. Donenfeld [Thu, 29 Sep 2016 17:31:22 +0000 (19:31 +0200)] 
git: organize ignore files

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoRework headers and includes
Jason A. Donenfeld [Thu, 29 Sep 2016 02:36:14 +0000 (04:36 +0200)] 
Rework headers and includes

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agowg: allow multiple AllowedIPs invocations
Jason A. Donenfeld [Tue, 30 Aug 2016 02:35:51 +0000 (04:35 +0200)] 
wg: allow multiple AllowedIPs invocations

It turns out this is a somewhat natural thing to do in config files.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoexamples: add key extractor
Jason A. Donenfeld [Wed, 24 Aug 2016 15:44:41 +0000 (17:44 +0200)] 
examples: add key extractor

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 years agoexamples: add nat-hole-punching
Jason A. Donenfeld [Tue, 23 Aug 2016 01:56:42 +0000 (03:56 +0200)] 
examples: add nat-hole-punching

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>