]>
git.ipfire.org Git - thirdparty/wireguard-tools.git/log
Jason A. Donenfeld [Tue, 15 May 2018 18:05:48 +0000 (20:05 +0200)]
wg-quick: darwin: ensure socket directory exists
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 15 May 2018 19:48:41 +0000 (21:48 +0200)]
dns-hatchet: update paths
Suggested-by: Martin Hauke <mardnh@gmx.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 15 May 2018 00:26:55 +0000 (02:26 +0200)]
ncat-client-server: add wg-quick variant
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 14 May 2018 20:28:53 +0000 (22:28 +0200)]
wg-quick: add darwin implementation
It's pretty rough and leaves much to be desired, but it works.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 14 May 2018 17:23:17 +0000 (19:23 +0200)]
wg-quick: add wg symlink
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 14 May 2018 16:20:13 +0000 (18:20 +0200)]
wg-quick: add android implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 14 May 2018 16:14:55 +0000 (18:14 +0200)]
wg: reorganize for multiplatform wg-quick
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 5 May 2018 01:54:55 +0000 (03:54 +0200)]
wg-quick: preliminary support for go implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 3 May 2018 17:07:55 +0000 (19:07 +0200)]
embeddable-wg-library: zero attribute padding
See: http://git.netfilter.org/libmnl/commit/?id=
37c876b55a2c00424ccda5a300ab5fdec1d88b22
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 1 May 2018 23:27:41 +0000 (01:27 +0200)]
keygen-html: add zip file example
A little bit more JavaScript for easy copy&pasting.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 14 Apr 2018 00:34:28 +0000 (02:34 +0200)]
wg-quick: account for specified fwmark in auto routing mode
If we're doing automatic routing with default routes, but the config has
also specified an explicit fwmark, then use that explicit fwmark, even
if it's conflicting, since the administrator has explicitly opted into
using it. Also, when shutting down the interface, we only now remove the
fancy rules if we're in automatic routing mode with default routes.
Suggested-by: Luis Ressel <aranea@aixah.de>
Reported-by: Saeid Akbari <saeidscorp@yahoo.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 4 Apr 2018 14:53:20 +0000 (10:53 -0400)]
wg-quick.8: fix typo
Reported-by: Mike Pechkin <mike.pechkin@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 4 Mar 2018 18:03:54 +0000 (19:03 +0100)]
wg-quick: hide errors on save
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 27 Feb 2018 23:17:43 +0000 (00:17 +0100)]
contrib: add extract-handshakes kprobe example
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 28 Feb 2018 18:46:28 +0000 (19:46 +0100)]
wg-quick: if resolvconf/run/iface exists, use it
Some older broken resolvconfs don't support resolvconf -l, but do have a
file in a standard location, so use it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 28 Feb 2018 18:24:31 +0000 (19:24 +0100)]
wg-quick: if resolvconf/interface-order exists, use it
Some older broken resolvconf implementations ignore -m, but do have an
interface-order list. It's better to use this list dynamically, in case
it changes, or in case it's not used by the OS's resolvconf
implementation, such as in the case of systemd or openresolv.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 26 Feb 2018 23:49:16 +0000 (00:49 +0100)]
global: in gnu code, use un-underscored asm
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 1 Mar 2018 01:14:50 +0000 (02:14 +0100)]
Revert "contrib: keygen-html: rewrite in pure javascript"
This reverts commit
e5203543a674453ce1e0cbbcb234d3308762fe65 .
As swanky as it is to have a really short file, it's hard to justify and
makes me nervous.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 23 Feb 2018 04:29:54 +0000 (05:29 +0100)]
contrib: keygen-html: rewrite in pure javascript
Emscripten is too cumbersome. This code here is much slower, but it's
shorter and simpler.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 21 Feb 2018 18:19:50 +0000 (19:19 +0100)]
contrib: embedded-wg-library: add key generation functions
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 21 Feb 2018 01:53:06 +0000 (02:53 +0100)]
contrib: embedded-wg-library: add ability to add and del interfaces
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 17 Feb 2018 18:39:26 +0000 (19:39 +0100)]
wg: fixup errno handling
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 17 Feb 2018 18:30:05 +0000 (19:30 +0100)]
wg: FreeBSD doesn't have EAI_NODATA
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 17 Feb 2018 17:58:31 +0000 (18:58 +0100)]
wg: do not collide types with libc clashes
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 15 Feb 2018 12:50:12 +0000 (13:50 +0100)]
contrib: add embeddable wireguard library
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 17 Feb 2018 04:54:48 +0000 (05:54 +0100)]
wg(8): clarify phrasing
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 16 Feb 2018 19:10:25 +0000 (20:10 +0100)]
wg: allow in-line comments
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 15 Feb 2018 12:12:28 +0000 (13:12 +0100)]
external-tests: update go version
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 14 Feb 2018 22:21:11 +0000 (23:21 +0100)]
wg: normalize strncpy/snprintf usage
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 6 Feb 2018 11:52:09 +0000 (12:52 +0100)]
wg-quick: match from beginning rather than shift right
Before, this meant that it simply took the last 15 characters, instead
of erroring out when there's more than 15 chars.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 5 Feb 2018 11:23:10 +0000 (12:23 +0100)]
wg: endian.h is not portable
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 2 Feb 2018 21:03:11 +0000 (22:03 +0100)]
keygen-html: fix up copyright
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 1 Feb 2018 18:15:28 +0000 (19:15 +0100)]
curve25519: replace fiat64 with faster hacl64
This reverts commit
da4ff396cc5d5e0ff21f9ecbc2f951c048c63fff and adds
some optimizations to hacl64.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 31 Jan 2018 15:53:59 +0000 (16:53 +0100)]
curve25519: replace hacl64 with fiat64
For now, it's faster:
hacl64: 109782 cycles per call
fiat64: 108984 cycles per call
It's quite possible this commit will be reverted with nice changes from
INRIA, though.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 31 Jan 2018 14:58:17 +0000 (15:58 +0100)]
wg: dedup secret normalization
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 29 Jan 2018 20:40:08 +0000 (21:40 +0100)]
wg: fread doesn't change errno
Thus we might be responding to an old errno, which could cause this to
unnecessarily fail.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 22 Jan 2018 17:11:32 +0000 (18:11 +0100)]
contrib: keygen-html: share curve25519 implementation with kernel
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 22 Jan 2018 16:58:44 +0000 (17:58 +0100)]
wg: share curve25519 implementations with kernel
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 18 Jan 2018 17:41:45 +0000 (18:41 +0100)]
curve25519-fiat32: uninline certain functions
While this has a negative performance impact on x86_64, it has a
positive performance impact on smaller machines, which is where we're
actually using this code. For example, an A53:
Before: fiat32: 228605 cycles per call
After: fiat32: 188307 cycles per call
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 18 Jan 2018 10:50:49 +0000 (11:50 +0100)]
contrib: keygen-html: update curve25519 implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 18 Jan 2018 10:46:01 +0000 (11:46 +0100)]
wg: import new curve25519 implementations
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 18 Jan 2018 10:24:04 +0000 (11:24 +0100)]
wg: plug memleak in config error path
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Piotr Lizończyk [Wed, 10 Jan 2018 16:46:57 +0000 (17:46 +0100)]
external-tests: add python implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 10 Jan 2018 01:37:03 +0000 (02:37 +0100)]
wg-quick: ifnames have max len of 15
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 3 Jan 2018 20:58:00 +0000 (21:58 +0100)]
global: year bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 13 Dec 2017 00:17:55 +0000 (01:17 +0100)]
wg-quick: dumber matching for default routes
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Luis Ressel [Tue, 12 Dec 2017 22:10:08 +0000 (23:10 +0100)]
wg-quick: add the "Table" config option
* Table=auto (default) selects the current behaviour
* Table=off disables creation of routes altogether
* All other values are passed through to "ip route add"'s table option
Signed-off-by: Luis Ressel <aranea@aixah.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 12 Dec 2017 00:08:18 +0000 (01:08 +0100)]
keygen-html: remove prebuilt file
We also reduce the optimization level, just in case, but add closure
compiler into the mix.
Suggested-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Greg Kroah-Hartman [Thu, 30 Nov 2017 15:23:50 +0000 (15:23 +0000)]
global: add SPDX tags to all files
It's good to have SPDX identifiers in all files as the Linux kernel
developers are working to add these identifiers to all files.
Update all files with the correct SPDX license identifier based on the license
text of the project or based on the license in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of the
full boiler plate text.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Modified-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 1 Dec 2017 18:42:46 +0000 (19:42 +0100)]
wg: no need to put this on the stack
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 1 Dec 2017 18:41:16 +0000 (19:41 +0100)]
wg: remove undocumented unused syntax
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 1 Dec 2017 12:31:33 +0000 (13:31 +0100)]
contrib: keygen-html for generating keys in the browser
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 23 Nov 2017 00:17:25 +0000 (01:17 +0100)]
wg: fix removing preshared keys
Also clean up related logic quite a bit and add unit tests.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 22 Nov 2017 15:49:56 +0000 (16:49 +0100)]
global: switch from timeval to timespec
This gets us nanoseconds instead of microseconds, which is better, and
we can do this pretty much without freaking out existing userspace,
which doesn't actually make use of the nano/micro seconds field:
zx2c4@thinkpad ~ $ cat a.c
void main()
{
puts(sizeof(struct timeval) == sizeof(struct timespec) ? "success" : "failure");
}
zx2c4@thinkpad ~ $ gcc a.c -m64 && ./a.out
success
zx2c4@thinkpad ~ $ gcc a.c -m32 && ./a.out
success
This doesn't solve y2038 problem, but timespec64 isn't yet a thing in
userspace.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 17 Nov 2017 12:39:02 +0000 (13:39 +0100)]
wg: tighten up strtoul parsing
Reported-by: Cedric Buxin <cedric.buxin@izri.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 11 Nov 2017 15:49:34 +0000 (00:49 +0900)]
wg-quick: document localhost exception and v6 rule
Reported-by: Hermann Lienstromberg <nurtic-vibe@grmml.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 11 Nov 2017 03:30:21 +0000 (12:30 +0900)]
wg: allow for NULL keys everywhere
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 10 Nov 2017 08:30:24 +0000 (17:30 +0900)]
wg: remove ioctl cruft
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 9 Nov 2017 05:12:06 +0000 (14:12 +0900)]
wg-quick: allow for tabs in keys
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 8 Nov 2017 09:40:07 +0000 (18:40 +0900)]
wg-quick: stat the correct enclosing folder of config file
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 31 Oct 2017 18:47:39 +0000 (19:47 +0100)]
wg-quick: save all hooks on save
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 31 Oct 2017 17:13:31 +0000 (18:13 +0100)]
wg-quick: fsync the temporary file before renaming
This ensures that on an unclean shutdown, we either see the old content
or the new content, but not empty content.
Suggested-by: Ka Ho Ng <ngkaho1234@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 31 Oct 2017 16:51:38 +0000 (17:51 +0100)]
wg-quick: allow for saving existing interface
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 31 Oct 2017 15:15:19 +0000 (16:15 +0100)]
contrib: add reresolve-dns
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 31 Oct 2017 13:55:17 +0000 (14:55 +0100)]
wg: correct type for CTRL_ATTR_FAMILY_ID
Suggested-by: Jörg Thalheim <joerg@thalheim.io>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 31 Oct 2017 10:38:09 +0000 (11:38 +0100)]
wg-quick: allow for the hatchet, but not by default
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 26 Oct 2017 20:49:46 +0000 (22:49 +0200)]
wg-quick: remember to rewind DNS settings on failure
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 25 Oct 2017 19:55:17 +0000 (21:55 +0200)]
wg-quick: allow specifiying multiple hooks
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 25 Oct 2017 15:56:08 +0000 (17:56 +0200)]
global: style nits
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 25 Oct 2017 15:13:46 +0000 (17:13 +0200)]
global: infuriating kernel iterator style
One types:
for (i = 0 ...
So one should also type:
for_each_obj (obj ...
But the upstream kernel style guidelines are insane, and so we must
instead do:
for_each_obj(obj ...
Ugly, but one must choose his battles wisely.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 17 Oct 2017 17:20:52 +0000 (19:20 +0200)]
wg: account for padding being in zero attribute
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 17 Oct 2017 16:48:41 +0000 (18:48 +0200)]
wg: newline after warning
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 16 Oct 2017 20:18:29 +0000 (22:18 +0200)]
wg: style
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 16 Oct 2017 01:28:24 +0000 (03:28 +0200)]
wg: add pass example to wg-quick man page
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 16 Oct 2017 01:17:12 +0000 (03:17 +0200)]
wg: don't insist on having a private key
This lets us do flexible things from wg-quick such as:
PostUp = wg set %i private-key <(pass WireGuard/private-keys/%i)
It also was never a very sensible policy to enforce.
Suggested-by: Luis Ressel <aranea@aixah.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 15 Oct 2017 20:52:38 +0000 (22:52 +0200)]
wg: retry resolution except when fatal
The reference to this is <https://sourceware.org/glibc/wiki/NameResolver>,
which mentions:
"From the perspective of the application that calls getaddrinfo() it
perhaps doesn't matter that much since EAI_FAIL, EAI_NONAME and
EAI_NODATA are all permanent failure codes and the causes are all
permanent failures in the sense that there is no point in retrying
later."
This should cover more early-boot situations.
While we're at it, we clean up the logic a bit so that we don't have a
retry message on the final non-retrying attempt. We also peer into errno
when receiving EAI_SYSTEM, to report to the user what actually happened.
Also, fix the quoting back tick front tick mess.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 15 Oct 2017 19:29:01 +0000 (21:29 +0200)]
wg: encoding: be more paranoid
Needless, but overkill can be fun.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sat, 14 Oct 2017 03:17:40 +0000 (05:17 +0200)]
Makefile: even prettier output
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 10 Oct 2017 23:55:45 +0000 (01:55 +0200)]
wg: man: include kill-switch documentation using fwmark
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 10 Oct 2017 15:17:43 +0000 (17:17 +0200)]
wg: store tail pointer to make coalescing peers fast
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 9 Oct 2017 11:27:00 +0000 (13:27 +0200)]
wg: warn once on unrecognized items
DaveM suggests we do in fact do this. Others on the same thread weren't
happy about the length of the proposed message, so we also give a bit of
a less dramatic warning.
This reverts commit
a2cc976a3b572cf308cc2d97c080eacac60416fe .
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 8 Oct 2017 14:24:37 +0000 (16:24 +0200)]
wg: try again if dump is interrupted
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 5 Oct 2017 18:52:19 +0000 (20:52 +0200)]
Makefile: clang now builds the kernel, so use scan-build
Also add little stub for coccinelle and clean up semicolon issue it
found.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 3 Oct 2017 15:16:37 +0000 (17:16 +0200)]
Makefile: add non-verbose mode to tools
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 3 Oct 2017 04:18:45 +0000 (06:18 +0200)]
global: satisfy bitshift pedantry
Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 2 Oct 2017 14:32:20 +0000 (16:32 +0200)]
contrib: remove worthless build artifact
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 2 Oct 2017 11:05:35 +0000 (13:05 +0200)]
wg: compile on non-Linux
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 2 Oct 2017 01:44:06 +0000 (03:44 +0200)]
wg: simmer down silly compilers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 2 Oct 2017 00:51:57 +0000 (02:51 +0200)]
wg: do not warn on unrecognized items
Upstream advice is to simply be silent.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 1 Oct 2017 20:05:19 +0000 (22:05 +0200)]
wg-quick: check permissions of parent directory
Also prefix octal 0, in case these files are actually of modes that
don't start with 0 by accident (such as SUID or sticky bit).
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 1 Oct 2017 19:42:32 +0000 (21:42 +0200)]
wg-quick: verify wireguard interface in more clever way
This helps with old Debian which has ancient iproute2, as well as paving
the path toward this script supporting userspace implementations.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 1 Oct 2017 19:37:53 +0000 (21:37 +0200)]
wg-quick: anchor sysctl regex to start and end
This doesn't actually fix a real problem, but it is more correct than
not having it.
Suggested-by: Aaron Sigel <aaron@vtty.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 25 Sep 2017 02:22:09 +0000 (04:22 +0200)]
netlink: switch from ioctl to netlink for configuration
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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>
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>
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>
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>
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>
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>
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>