]>
git.ipfire.org Git - thirdparty/wireguard-tools.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Jason A. Donenfeld [Mon, 25 Jul 2016 12:17:11 +0000 (14:17 +0200)]
tests: use makefile and expand greatly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 8 Aug 2016 11:53:00 +0000 (13:53 +0200)]
persistent-keepalive: change range to [1,65535]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 1 Aug 2016 19:31:07 +0000 (21:31 +0200)]
wg: use correct headers in ipc
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 28 Jul 2016 15:18:17 +0000 (17:18 +0200)]
wg: do not show private keys in pretty output
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 27 Jul 2016 09:30:05 +0000 (11:30 +0200)]
c: specify static array size in function params
The C standard states:
A declaration of a parameter as ``array of type'' shall be adjusted to ``qualified pointer to
type'', where the type qualifiers (if any) are those specified within the [ and ] of the
array type derivation. If the keyword static also appears within the [ and ] of the
array type derivation, then for each call to the function, the value of the corresponding
actual argument shall provide access to the first element of an array with at least as many
elements as specified by the size expression.
By changing void func(int array[4]) to void func(int array[static 4]),
we automatically get the compiler checking argument sizes for us, which
is quite nice.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 22 Jul 2016 19:07:12 +0000 (21:07 +0200)]
wg: use stream instead of seqpacket
To support OS X and Windows, we have to. Ugh.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 22 Jul 2016 18:30:34 +0000 (20:30 +0200)]
wg: Use seqpacket instead of dgram
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 22 Jul 2016 12:58:30 +0000 (14:58 +0200)]
wg: add -MP to makefile
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 21 Jul 2016 14:38:56 +0000 (16:38 +0200)]
wg: add default cflag
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 21 Jul 2016 11:33:20 +0000 (13:33 +0200)]
wg: propagate set errno
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 21 Jul 2016 10:27:54 +0000 (12:27 +0200)]
wg: abstract sockets are dangerous
They have no permissions, so we're probably better off just creating a
socket file with the umask set, as we do in BSD.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 20 Jul 2016 19:24:27 +0000 (21:24 +0200)]
wg: rename kernel to ipc
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 20 Jul 2016 18:52:11 +0000 (20:52 +0200)]
wg: support horrible freebsd/osx/unix semantics
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 19 Jul 2016 13:26:56 +0000 (15:26 +0200)]
wg: first additions of userspace integration
This is designed to work with a server that follows this:
struct sockaddr_un addr = {
.sun_family = AF_UNIX,
.sun_path = "/var/run/wireguard/wguserspace0.sock"
};
int fd, ret;
ssize_t len;
socklen_t socklen;
struct wgdevice *device;
fd = socket(AF_UNIX, SOCK_DGRAM, 0);
if (fd < 0)
exit(1);
if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
exit(1);
for (;;) {
/* First we look at how big the next message is, so we know how much to
* allocate. Note on BSD you can instead use ioctl(fd, FIONREAD, &len). */
len = recv(fd, NULL, 0, MSG_PEEK | MSG_TRUNC);
if (len < 0) {
handle_error();
continue;
}
/* Next we allocate a buffer for the received data. */
device = NULL;
if (len) {
device = malloc(len);
if (!device) {
handle_error();
continue;
}
}
/* Finally we receive the data, storing too the return address. */
socklen = sizeof(addr);
len = recvfrom(fd, device, len, 0, (struct sockaddr *)&addr, (socklen_t *)&socklen);
if (len < 0) {
handle_error();
free(device);
continue;
}
if (!len) { /* If len is zero, it's a "get" request, so we send our device back. */
device = get_current_wireguard_device(&len);
sendto(fd, device, len, 0, (struct sockaddr *)&addr, socklen);
} else { /* Otherwise, we just received a wgdevice, so we should "set" and send back the return status. */
ret = set_current_wireguard_device(device);
sendto(fd, &ret, sizeof(ret), 0, (struct sockaddr *)&addr, socklen);
free(device);
}
}
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Mon, 11 Jul 2016 10:49:47 +0000 (12:49 +0200)]
wg: fix numbering in man page
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 8 Jul 2016 18:34:32 +0000 (20:34 +0200)]
persistent keepalive: use authenticated keepalives
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 8 Jul 2016 21:41:45 +0000 (23:41 +0200)]
examples: update ncat-client-server readme
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 8 Jul 2016 10:36:04 +0000 (12:36 +0200)]
persistent keepalive: enable in an example
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 8 Jul 2016 00:52:41 +0000 (02:52 +0200)]
persistent keepalive: documentation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 8 Jul 2016 00:30:03 +0000 (02:30 +0200)]
persistent keepalive: add userspace support
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jonathan Rudenberg [Thu, 7 Jul 2016 11:58:30 +0000 (07:58 -0400)]
go test: don't rely on undefined append behavior
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 7 Jul 2016 11:48:04 +0000 (13:48 +0200)]
rust test: actually use tai64n
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 7 Jul 2016 11:47:32 +0000 (13:47 +0200)]
go test: actually use TAI64N
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 7 Jul 2016 11:44:01 +0000 (13:44 +0200)]
go test: don't use 1 as icmp ids
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 7 Jul 2016 11:42:35 +0000 (13:42 +0200)]
go test: dynamically calculate ip checksum
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jonathan Rudenberg [Thu, 7 Jul 2016 02:57:08 +0000 (22:57 -0400)]
go test: add ICMP ping
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 7 Jul 2016 01:52:21 +0000 (03:52 +0200)]
external-tests: switch to demo server
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 7 Jul 2016 00:32:40 +0000 (02:32 +0200)]
go test: put nonce at correct location
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jonathan Rudenberg [Wed, 6 Jul 2016 23:49:30 +0000 (19:49 -0400)]
go test: make more idiomatic
- gofmt
- Give config struct one line per field
- Use camel case
- Check errors
- Log invariants with detail
- Use consistent pronouns
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Wed, 6 Jul 2016 21:51:00 +0000 (23:51 +0200)]
wg: use pkg-config in Makefile
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Tue, 5 Jul 2016 14:01:31 +0000 (16:01 +0200)]
contrib: organize example scripts and add synergy
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 3 Jul 2016 18:39:47 +0000 (20:39 +0200)]
wg: always fallback to /dev/urandom
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Sun, 3 Jul 2016 18:06:33 +0000 (20:06 +0200)]
wg: improve error reporting and detection
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 1 Jul 2016 21:36:59 +0000 (23:36 +0200)]
contrib: remove extraneous cruft
We don't want people packaging these or even using these scripts, which
are only useful for limited development circumstances, so get rid of
them. More widespread development testing techniques still exist in
src/debug.mk and src/netns.sh
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 1 Jul 2016 02:08:29 +0000 (04:08 +0200)]
wg.8: wording tweaks
Suggested-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Thu, 30 Jun 2016 19:45:42 +0000 (21:45 +0200)]
Readme: the documentation moved to .io
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Daniel Kahn Gillmor [Thu, 30 Jun 2016 18:47:09 +0000 (14:47 -0400)]
Readme: use https instead of http
For the websites referenced that offer https instead of http, use
https.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Jason A. Donenfeld [Fri, 5 Jun 2015 13:58:00 +0000 (15:58 +0200)]
Initial commit
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>