aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests/qemu: Pin most of the tarball hashesjn/qemu-hashJonathan Neuschäfer2018-05-141-11/+50
| | | | | | | | | | | | | | | When src/tests/qemu/Makefile downloads tarballs, they may be corrupted by accident or malice. Detect such errors by comparing the downloaded files to their known-good hashes. In the case of iperf there is actually a chance of a successful MitM attack because the tarball is downloaded over plain HTTP if the mirror (https://download.wireguard.com/...) isn't reachable for some reason. Only the kernel tarball isn't checked, because the makefile needs to work with many different kernel versions. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* version: bump snapshot0.0.20180513Jason A. Donenfeld2018-05-132-2/+2
|
* compat: don't clear header bits on RHELJason A. Donenfeld2018-05-131-1/+4
| | | | | | | | | | The 3.10 kernel from Red Hat puts head_frag in between headers_start and headers_end. This is triggered on the latest i40e driver. This results in the packet being freed incorrectly, crashing the system. So, this patch just ensures we don't zero any of the header bits. The whole issue of zeroing header bits probably should be revisited sometime somewhat soon.
* compat: handle RHEL 7.5's recent backportsJason A. Donenfeld2018-05-131-5/+5
|
* queueing: preserve pfmemalloc header bitJason A. Donenfeld2018-05-131-0/+2
|
* chacha20poly1305: make gcc 8.1 happySamuel Neves2018-05-131-2/+2
| | | | | | | | | | | | | | | GCC 8.1 does not know about the invariant `0 <= ctx->num < POLY1305_BLOCK_SIZE`. This results in a warning that `memcpy(ctx->data + num, inp, len);` may overflow the `data` field, which is correct for arbitrary values of `num`. To make the invariant explicit we ensure that `num` is in the required range. An alternative would be to change `ctx->num` to a 4-bit bitfield at the point of declaration. This changes the code from `test ebp, ebp; jz end` to `and ebp, 15; jz end`, which have identical performance characteristics. Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
* socket: use skb_put_dataJason A. Donenfeld2018-05-132-3/+12
|
* wg-quick: preliminary support for go implementationJason A. Donenfeld2018-05-101-1/+7
|
* allowedips: simplify arithmeticJason A. Donenfeld2018-05-101-1/+1
| | | | Suggested-by: Samuel Neves <sneves@dei.uc.pt>
* allowedips: produce better assembly with unsigned arithmeticJason A. Donenfeld2018-05-101-9/+9
| | | | Suggested-by: Samuel Neves <sneves@dei.uc.pt>
* allowedips: use native endian on lookupJason A. Donenfeld2018-05-101-21/+40
|
* allowedips: add selftest for allowedips_walk_by_peerJason A. Donenfeld2018-05-101-1/+60
| | | | | | Also we satisfy lockdep here. Suggested-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* qemu: retry on 404 in wget for kernel.org raceJason A. Donenfeld2018-04-231-3/+1
|
* version: bump snapshot0.0.20180420Jason A. Donenfeld2018-04-202-2/+2
|
* poly1305: do not place constants in different sectionsJason A. Donenfeld2018-04-181-14/+1
| | | | | | | We're referencing these constants as one contiguous blob, so if there's any merging that goes on with other constants elsewhere (such as the kernel's current poly1305 implementation that we hope to replace), then these will be reordered and have the wrong values.
* compat: remove unused dev_recursion_level backportJason A. Donenfeld2018-04-161-7/+0
|
* blake2s: remove unused helperJason A. Donenfeld2018-04-161-5/+0
|
* send: simplify skb_padding with nice macroJason A. Donenfeld2018-04-161-4/+3
|
* send: account for route-based MTUJason A. Donenfeld2018-04-155-3/+26
| | | | | | | | | | It might be that a particular route has a different MTU than the interface, via `ip route add ... dev wg0 mtu 1281`, for example. In this case, it's important that we don't accidently pad beyond the end of the MTU. We accomplish that in this patch by carrying forward the MTU from the dst if it exists. We also add a unit test for this issue. Reported-by: Roman Mamedov <rm.wg@romanrm.net>
* wg-quick: account for specified fwmark in auto routing modeJason A. Donenfeld2018-04-151-19/+23
| | | | | | | | | | | 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>
* qemu: bump default versionJason A. Donenfeld2018-04-151-1/+1
|
* version: bump snapshot0.0.20180413Jason A. Donenfeld2018-04-132-2/+2
|
* chacha20poly1305: put magic constant behind macroJason A. Donenfeld2018-04-052-3/+5
|
* chacha20poly1305: add self tests from wycheproofJason A. Donenfeld2018-04-051-3/+1026
|
* curve25519: add self tests from wycheproofJason A. Donenfeld2018-04-041-0/+504
|
* wg-quick.8: fix typoJason A. Donenfeld2018-04-041-1/+1
| | | | Reported-by: Mike Pechkin <mike.pechkin@gmail.com>
* curve25519: precomp const correctnessJason A. Donenfeld2018-03-091-24/+22
|
* curve25519: memzero in batchesJason A. Donenfeld2018-03-091-140/+124
|
* curve25519: use cmov instead of xor for cswapJason A. Donenfeld2018-03-091-12/+39
| | | | Also add cselect optimization.
* curve25519: use precomp implementation instead of sandy2xJason A. Donenfeld2018-03-094-3438/+2071
| | | | It's faster and doesn't use the FPU.
* compat: support OpenSUSE 15Jason A. Donenfeld2018-03-091-3/+6
|
* compat: silence warning on frankenkernelsJason A. Donenfeld2018-03-091-0/+3
| | | | Some Android 3.18 devices backport this macro.
* compat: stable kernels are now receiving b87b619Jason A. Donenfeld2018-03-071-1/+1
|
* wg-quick: hide errors on saveJason A. Donenfeld2018-03-041-1/+1
|
* version: bump snapshot0.0.20180304Jason A. Donenfeld2018-03-042-2/+2
|
* wg-quick: if resolvconf/run/iface exists, use itJason A. Donenfeld2018-03-041-1/+1
| | | | | Some older broken resolvconfs don't support resolvconf -l, but do have a file in a standard location, so use it.
* wg-quick: if resolvconf/interface-order exists, use itJason A. Donenfeld2018-03-041-3/+12
| | | | | | | 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.
* noise: align static_identity keysJason A. Donenfeld2018-03-021-1/+1
|
* compat: use correct -include pathJason A. Donenfeld2018-03-021-5/+6
|
* noise: fix function prototypeJason A. Donenfeld2018-03-021-1/+1
|
* global: in gnu code, use un-underscored asmJason A. Donenfeld2018-03-023-3/+3
|
* messages: MESSAGE_TOTAL is unusedJason A. Donenfeld2018-03-021-2/+1
|
* crypto: read only after initJason A. Donenfeld2018-03-024-10/+11
|
* Kconfig: require DST_CACHE explicitlyJason A. Donenfeld2018-03-021-0/+1
|
* compat: workaround netlink refcount bugJason A. Donenfeld2018-03-021-1/+1
| | | | | | | For now it looks like only 4.16 has this, but we'll keep track in case others add it too. Upstream-fix: b87b6194be63 ("netlink: put module reference if dump start fails")
* allowedips: fix comment styleJason A. Donenfeld2018-02-211-1/+2
|
* queueing: skb_reset: mark as xnetJason A. Donenfeld2018-02-201-1/+1
| | | | | | | | This was avoided for a long time, because I wanted the packet to be charged to the original socket for as long as possible. However, this broke net_cls, which looks at skb->sk for additional late-stage routing decisions. So we had no choice but to ensure that skb->sk is NULL by the time of xmit, and this means calling the skb destructor.
* version: bump snapshot0.0.20180218Jason A. Donenfeld2018-02-182-2/+2
|
* tools: fixup errno handlingJason A. Donenfeld2018-02-172-8/+8
|
* tools: FreeBSD doesn't have EAI_NODATAJason A. Donenfeld2018-02-171-2/+15
|